diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2017-07-05 08:08:24 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2017-07-05 08:08:24 +0200 |
commit | 4cd52cc456cdc2c6fa0b191f95c75e7bea75eff6 (patch) | |
tree | c85542d2916a85de1d930cb6a5fdd9f68bc55e41 /cpukit | |
parent | arm: Fix ARMv7-M interrupt processing (diff) | |
download | rtems-4cd52cc456cdc2c6fa0b191f95c75e7bea75eff6.tar.bz2 |
score: Avoid clash with <strings.h> provided fls()
Diffstat (limited to 'cpukit')
-rw-r--r-- | cpukit/score/src/kern_tc.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/cpukit/score/src/kern_tc.c b/cpukit/score/src/kern_tc.c index 65e6fea2d2..f385e6d946 100644 --- a/cpukit/score/src/kern_tc.c +++ b/cpukit/score/src/kern_tc.c @@ -75,10 +75,11 @@ ISR_LOCK_DEFINE(, _Timecounter_Lock, "Timecounter") #define bcopy(x, y, z) memcpy(y, x, z); #define log(...) static inline int -fls(int x) +builtin_fls(int x) { return x ? sizeof(x) * 8 - __builtin_clz(x) : 0; } +#define fls(x) builtin_fls(x) /* FIXME: https://devel.rtems.org/ticket/2348 */ #define ntp_update_second(a, b) do { (void) a; (void) b; } while (0) #endif /* __rtems__ */ |