summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn Kacur <jkacur@redhat.com>2015-10-21 18:25:37 +0200
committerJohn Kacur <jkacur@redhat.com>2015-10-21 18:30:14 +0200
commit73bc7345eebb2244efc527928fdac7b8e29193cd (patch)
treeb0fa61d53b266a7a7a0fece35c616f3b07531b12
parentafc0f753c3f626368afcee3cc2d7193d32ac04e1 (diff)
downloadrt-tests-73bc7345eebb2244efc527928fdac7b8e29193cd.tar.gz
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. 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. Signed-off-by: John Kacur <jkacur@redhat.com>
-rw-r--r--src/cyclictest/cyclictest.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/cyclictest/cyclictest.c b/src/cyclictest/cyclictest.c
index 00168e2..975e785 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