Re: [PATCH] cyclictest: fix #ifdef broken by NO_PTHREAD_SETAFFINITY
From: Henrik Austad <hidden>
Date: 2015-10-21 18:13:55
On Wed, Oct 21, 2015 at 06:34:48PM +0200, John Kacur wrote:
From 73bc7345eebb2244efc527928fdac7b8e29193cd Mon Sep 17 00:00:00 2001 From: John Kacur <jkacur@redhat.com> Date: Wed, 21 Oct 2015 18:25:37 +0200 Subject: [PATCH] cyclictest: fix #ifdef broken by NO_PTHREAD_SETAFFINITY Unfortunately c869f3cdcd023eec2f767eb4094caa88178717a4 wasn't sufficient to fix #ifdef #else functionality for uclib, broken by the changes for bionic.
Yeah, you're right. The wonders of #ifdefs
In practice this probably didn't break anyone though, except possibly for the new bionic code which probaly doesn't have too many adapters (yet). This should also help Henrik move the NO_PTHREAD_SETAFFINITY functionality to the bionic file.
I'm ripping all of the NO_PTHREAD_SETAFFINITY out of cyclictest, so if you don't mind, hold off pushing this to the repo -I'm cleaning up my mess.
quoted hunk ↗ jump to hunk
Signed-off-by: John Kacur <jkacur@redhat.com> --- src/cyclictest/cyclictest.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-)diff --git a/src/cyclictest/cyclictest.c b/src/cyclictest/cyclictest.c index 00168e22fc7f..975e7858fb8e 100644 --- a/src/cyclictest/cyclictest.c +++ b/src/cyclictest/cyclictest.c@@ -83,6 +83,10 @@ int sched_setaffinity (__pid_t __pid, size_t __cpusetsize, #define CPU_SET(cpu, cpusetp) #define CPU_ZERO(cpusetp) +#else +extern int clock_nanosleep(clockid_t __clock_id, int __flags, + __const struct timespec *__req, + struct timespec *__rem); #endif #ifdef NO_PTHREAD_SETAFFINITY@@ -91,11 +95,6 @@ static inline int pthread_setaffinity_np(pthread_t thread, size_t cpusetsize, { return sched_setaffinity(0, cpusetsize, cpuset); } - -#else -extern int clock_nanosleep(clockid_t __clock_id, int __flags, - __const struct timespec *__req, - struct timespec *__rem); #endif #define USEC_PER_SEC 1000000-- 2.4.3 -- To unsubscribe from this list: send the line "unsubscribe linux-rt-users" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
-- Henrik Austad
Attachments
- signature.asc [application/pgp-signature] 181 bytes