subrepo:
subdir: "deps/lightrec"
merged: "
d3329782"
upstream:
origin: "https://github.com/pcercuei/lightrec.git"
branch: "master"
commit: "
d3329782"
git-subrepo:
version: "0.4.3"
origin: "https://github.com/ingydotnet/git-subrepo.git"
commit: "
2f68596"
[subrepo]
remote = https://github.com/pcercuei/lightrec.git
branch = master
- commit = d90de68429bf9c2d67c5f5051d495d1e3131e636
- parent = a9725dc07f40b39a5533d546b59e45377d1f9b66
+ commit = d3329782e806b9643239832f59e09d48ebc03d01
+ parent = fc75c5470b8d931ad59d66b27203f02c1d1e674d
method = merge
cmdver = 0.4.3
static u32 count_leading_bits(s32 data)
{
-#if defined(__has_builtin) && __has_builtin(__builtin_clrsb)
- return 1 + __builtin_clrsb(data);
-#else
u32 cnt = 33;
+#ifdef __has_builtin
+#if __has_builtin(__builtin_clrsb)
+ return 1 + __builtin_clrsb(data);
+#endif
+#endif
+
data = (data ^ (data >> 31)) << 1;
do {
} while (data);
return cnt;
-#endif
}
static void lightrec_mtc2(struct lightrec_state *state, u8 reg, u32 data)
#ifndef __LIGHTREC_SLIST_H__
#define __LIGHTREC_SLIST_H__
+#include <stddef.h>
+
#define container_of(ptr, type, member) \
((type *)((void *)(ptr) - offsetof(type, member)))