From: Jan Kiszka <jan.kiszka@domain.hid>
To: Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org>,
Philippe Gerum <rpm@xenomai.org>
Cc: xenomai-core <xenomai@xenomai.org>
Subject: [Xenomai-core] [RFC][PATCH] link-check sched_setaffinity
Date: Tue, 12 Jun 2007 20:21:43 +0200 [thread overview]
Message-ID: <466EE437.40905@domain.hid> (raw)
[-- Attachment #1.1: Type: text/plain, Size: 261 bytes --]
Hi,
as indicated earlier, there is an issue with uClibc from the blackfin
distribution: AC_TRY_COMPILE succeeds, but linking later on fails.
So my suggestion is to try to link already during configure (and test
for missing defines differently).
Jan
[-- Attachment #1.2: link-check-sched_setaffinity.patch --]
[-- Type: text/plain, Size: 2075 bytes --]
Index: configure.in
===================================================================
--- configure.in (Revision 2571)
+++ configure.in (Arbeitskopie)
@@ -516,12 +516,12 @@
AC_CACHE_VAL(ac_cv_sched_setaffinity,
save_CFLAGS="$CFLAGS"
CFLAGS="-Wimplicit-function-declaration -Werror -D_GNU_SOURCE"
- [AC_TRY_COMPILE([#include <sched.h>],
+ [AC_TRY_LINK([#include <sched.h>],
[cpu_set_t cpu_set; sched_setaffinity(0, sizeof(cpu_set), &cpu_set);],
[ac_cv_sched_setaffinity=new],
[ac_cv_sched_setaffinity=bad])]
if test $ac_cv_sched_setaffinity = bad ; then
- [AC_TRY_COMPILE([#include <sched.h>],
+ [AC_TRY_LINK([#include <sched.h>],
[cpu_set_t cpu_set; sched_setaffinity(0, &cpu_set);],
[ac_cv_sched_setaffinity=old],
[ac_cv_sched_setaffinity=no])]
Index: src/testsuite/switchtest/switchtest.c
===================================================================
--- src/testsuite/switchtest/switchtest.c (Revision 2571)
+++ src/testsuite/switchtest/switchtest.c (Arbeitskopie)
@@ -27,8 +27,10 @@
typedef unsigned long cpu_set_t;
#endif
#define do_sched_setaffinity(pid,len,mask) 0
+#ifndef CPU_ZERO
#define CPU_ZERO(set) do { *(set) = 0; } while(0)
#define CPU_SET(n,set) do { *(set) |= (1 << n); } while(0)
+#endif
#endif /* HAVE_OLD_SETAFFINITY */
#endif /* HAVE_RECENT_SETAFFINITY */
Index: src/testsuite/clocktest/clocktest.c
===================================================================
--- src/testsuite/clocktest/clocktest.c (Revision 2571)
+++ src/testsuite/clocktest/clocktest.c (Arbeitskopie)
@@ -18,6 +18,7 @@
#include <errno.h>
#include <pthread.h>
+#include <sched.h>
#include <signal.h>
#include <stdio.h>
#include <stdlib.h>
@@ -35,8 +36,10 @@
typedef unsigned long cpu_set_t;
#endif
#define sched_setaffinity(pid, len, mask) do { } while (0)
+#ifndef CPU_ZERO
#define CPU_ZERO(set) memset(set, 0, sizeof(*set))
#define CPU_SET(n, set) do { } while (0)
+#endif
#endif /* !HAVE_OLD_SETAFFINITY */
#endif /* !HAVE_RECENT_SETAFFINITY */
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 250 bytes --]
reply other threads:[~2007-06-12 18:21 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=466EE437.40905@domain.hid \
--to=jan.kiszka@domain.hid \
--cc=gilles.chanteperdrix@xenomai.org \
--cc=rpm@xenomai.org \
--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.