From: Jan Kiszka <jan.kiszka@domain.hid>
To: xenomai-core <xenomai@xenomai.org>
Subject: [Xenomai-core] [PATCH] fix ffnz for 64-bit hosts
Date: Mon, 23 Apr 2007 17:11:26 +0200 [thread overview]
Message-ID: <462CCC9E.1040500@domain.hid> (raw)
[-- 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 --]
next reply other threads:[~2007-04-23 15:11 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-04-23 15:11 Jan Kiszka [this message]
2007-04-24 8:18 ` [Xenomai-core] [PATCH] fix ffnz for 64-bit hosts Philippe Gerum
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=462CCC9E.1040500@domain.hid \
--to=jan.kiszka@domain.hid \
--cc=xenomai@xenomai.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.