fix ffnz for 64-bit hosts
PATCH 1/1 fix ffnz for 64-bit hosts
I'm just not sure if "#define _GNU_SOURCE" is the preferred way to go.
include/asm-sim/system.h +2 -1
@@ -24,6 +24,7 @@#include <asm/param.h> #include <errno.h> +#define _GNU_SOURCE#include <string.h> #include <malloc.h> #include <stdlib.h>
@@ -172,7 +173,7 @@ static inline unsigned long long xnarch_static inline unsigned long ffnz (unsigned long word) { -return ffs ((int )word) -1 ; +return ffsl (word) -1 ; }#define xnarch_stack_size (tcb) 0
ChangeLog +2 -0
@@ -5,6 +5,8 @@ * include/nucleus/system.h: Remove unused (and bogus) ffnz wrapper. + * include/asm-sim/system.h: Fix ffnz for 64-bit hosts. + 2007-04-19 Philippe Gerum <[email protected]> * ksrc/skins/vrtx/module.c, ksrc/nucleus/pipe.c,
Philippe Gerum
AppliedQuoted 2 lines · Jan Kiszka
I'm just not sure if "#define
_GNU_SOURCE" is the preferred way to go.
It's already there when compiling the skins in simulation mode.
Quoted 14 lines
Index:
xenomai/include/asm-sim/system.h
===================================================================include/asm-sim/system.h +1
-0@@ -24,6 +24,7 @@#include <asm/param.h> #include <errno.h> +#define _GNU_SOURCE#include <string.h> #include <malloc.h> #include <stdlib.h>
include/asm-sim/system.h static inline unsigned long long xnarch_ · line 178
Quoted 7 lines
include/asm-sim/system.h +1
-1@@ -172,7 +173,7 @@ static inline unsigned long long xnarch_static inline unsigned long ffnz (unsigned long word) { -return ffs ((int )word) -1 ; +return ffsl (word) -1 ; }
Merged, thanks.
Quoted 19 lines
include/asm-sim/system.h +0
-0#define xnarch_stack_size (tcb) 0Index: xenomai/ChangeLog
===================================================================ChangeLog +2
-0@@ -5,6 +5,8 @@ * include/nucleus/system.h: Remove unused (and bogus) ffnz wrapper. + * include/asm-sim/system.h: Fix ffnz for 64-bit hosts. + 2007-04-19 Philippe Gerum <[email protected]> * ksrc/skins/vrtx/module.c, ksrc/nucleus/pipe.c,_______________________________________________
Xenomai-core mailing list
[email protected]
https://mail.gna.org/listinfo/xenomai-core
Signature · 1 line
Philippe.