All of lore.kernel.org
 help / color / mirror / Atom feed
* [Xenomai-core] [PATCH] fix ffnz for 64-bit hosts
@ 2007-04-23 15:11 Jan Kiszka
  2007-04-24  8:18 ` Philippe Gerum
  0 siblings, 1 reply; 2+ messages in thread
From: Jan Kiszka @ 2007-04-23 15:11 UTC (permalink / raw)
  To: xenomai-core

[-- Attachment #1: Type: text/plain, Size: 1061 bytes --]

I'm just not sure if "#define _GNU_SOURCE" is the preferred way to go.


Index: xenomai/include/asm-sim/system.h
===================================================================
--- xenomai.orig/include/asm-sim/system.h
+++ xenomai/include/asm-sim/system.h
@@ -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
Index: xenomai/ChangeLog
===================================================================
--- xenomai.orig/ChangeLog
+++ xenomai/ChangeLog
@@ -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  <rpm@xenomai.org>
 
 	* ksrc/skins/vrtx/module.c, ksrc/nucleus/pipe.c,


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 250 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2007-04-24  8:18 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-04-23 15:11 [Xenomai-core] [PATCH] fix ffnz for 64-bit hosts Jan Kiszka
2007-04-24  8:18 ` Philippe Gerum

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.