From: Mathieu Desnoyers Date: Wed, 29 Jun 2011 17:43:22 +0000 (-0400) Subject: tests: only include syscall.h on linux systems X-Git-Tag: v0.6.4~12 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=65fcc7e9957a1658327acd121c3d8c3b36f4a94e;p=userspace-rcu.git tests: only include syscall.h on linux systems Signed-off-by: Mathieu Desnoyers --- diff --git a/tests/test_looplen.c b/tests/test_looplen.c index 01394e0..3a750cc 100644 --- a/tests/test_looplen.c +++ b/tests/test_looplen.c @@ -30,12 +30,15 @@ #include #include #include -#include #include #include #include +#ifdef __linux__ +#include +#endif + #if defined(_syscall0) _syscall0(pid_t, gettid) #elif defined(__NR_gettid) diff --git a/tests/test_mutex.c b/tests/test_mutex.c index 747bcc4..1194b02 100644 --- a/tests/test_mutex.c +++ b/tests/test_mutex.c @@ -31,12 +31,15 @@ #include #include #include -#include #include #include #include +#ifdef __linux__ +#include +#endif + /* hardcoded number of CPUs */ #define NR_CPUS 16384 diff --git a/tests/test_perthreadlock.c b/tests/test_perthreadlock.c index c233724..6c7114c 100644 --- a/tests/test_perthreadlock.c +++ b/tests/test_perthreadlock.c @@ -31,12 +31,15 @@ #include #include #include -#include #include #include #include +#ifdef __linux__ +#include +#endif + /* hardcoded number of CPUs */ #define NR_CPUS 16384 diff --git a/tests/test_perthreadlock_timing.c b/tests/test_perthreadlock_timing.c index 26b642a..bc20ed0 100644 --- a/tests/test_perthreadlock_timing.c +++ b/tests/test_perthreadlock_timing.c @@ -29,12 +29,15 @@ #include #include #include -#include #include #include #include +#ifdef __linux__ +#include +#endif + #if defined(_syscall0) _syscall0(pid_t, gettid) #elif defined(__NR_gettid) diff --git a/tests/test_qsbr.c b/tests/test_qsbr.c index 99da27c..12346c3 100644 --- a/tests/test_qsbr.c +++ b/tests/test_qsbr.c @@ -31,12 +31,15 @@ #include #include #include -#include #include #include #include +#ifdef __linux__ +#include +#endif + /* hardcoded number of CPUs */ #define NR_CPUS 16384 diff --git a/tests/test_qsbr_gc.c b/tests/test_qsbr_gc.c index c9b3f4a..0c1c124 100644 --- a/tests/test_qsbr_gc.c +++ b/tests/test_qsbr_gc.c @@ -31,12 +31,15 @@ #include #include #include -#include #include #include #include +#ifdef __linux__ +#include +#endif + /* hardcoded number of CPUs */ #define NR_CPUS 16384 diff --git a/tests/test_qsbr_timing.c b/tests/test_qsbr_timing.c index f9f4504..7925548 100644 --- a/tests/test_qsbr_timing.c +++ b/tests/test_qsbr_timing.c @@ -29,11 +29,14 @@ #include #include #include -#include #include #include +#ifdef __linux__ +#include +#endif + #if defined(_syscall0) _syscall0(pid_t, gettid) #elif defined(__NR_gettid) diff --git a/tests/test_rwlock.c b/tests/test_rwlock.c index deca53b..9c8f97e 100644 --- a/tests/test_rwlock.c +++ b/tests/test_rwlock.c @@ -31,12 +31,15 @@ #include #include #include -#include #include #include #include +#ifdef __linux__ +#include +#endif + /* hardcoded number of CPUs */ #define NR_CPUS 16384 diff --git a/tests/test_rwlock_timing.c b/tests/test_rwlock_timing.c index 96269c0..628bed4 100644 --- a/tests/test_rwlock_timing.c +++ b/tests/test_rwlock_timing.c @@ -30,12 +30,15 @@ #include #include #include -#include #include #include #include +#ifdef __linux__ +#include +#endif + #if defined(_syscall0) _syscall0(pid_t, gettid) #elif defined(__NR_gettid) diff --git a/tests/test_urcu.c b/tests/test_urcu.c index bbdb2d8..f1b2f21 100644 --- a/tests/test_urcu.c +++ b/tests/test_urcu.c @@ -31,12 +31,15 @@ #include #include #include -#include #include #include #include +#ifdef __linux__ +#include +#endif + /* hardcoded number of CPUs */ #define NR_CPUS 16384 diff --git a/tests/test_urcu_assign.c b/tests/test_urcu_assign.c index a73fc23..851b850 100644 --- a/tests/test_urcu_assign.c +++ b/tests/test_urcu_assign.c @@ -31,12 +31,15 @@ #include #include #include -#include #include #include #include +#ifdef __linux__ +#include +#endif + /* hardcoded number of CPUs */ #define NR_CPUS 16384 diff --git a/tests/test_urcu_bp.c b/tests/test_urcu_bp.c index f475fa6..52e7f45 100644 --- a/tests/test_urcu_bp.c +++ b/tests/test_urcu_bp.c @@ -31,12 +31,15 @@ #include #include #include -#include #include #include #include +#ifdef __linux__ +#include +#endif + /* hardcoded number of CPUs */ #define NR_CPUS 16384 diff --git a/tests/test_urcu_defer.c b/tests/test_urcu_defer.c index 248ac30..7d71f10 100644 --- a/tests/test_urcu_defer.c +++ b/tests/test_urcu_defer.c @@ -31,12 +31,15 @@ #include #include #include -#include #include #include #include +#ifdef __linux__ +#include +#endif + /* hardcoded number of CPUs */ #define NR_CPUS 16384 diff --git a/tests/test_urcu_gc.c b/tests/test_urcu_gc.c index d0f7e6e..4eaa61b 100644 --- a/tests/test_urcu_gc.c +++ b/tests/test_urcu_gc.c @@ -31,12 +31,15 @@ #include #include #include -#include #include #include #include +#ifdef __linux__ +#include +#endif + /* hardcoded number of CPUs */ #define NR_CPUS 16384 diff --git a/tests/test_urcu_lfq.c b/tests/test_urcu_lfq.c index b5cd559..cb50586 100644 --- a/tests/test_urcu_lfq.c +++ b/tests/test_urcu_lfq.c @@ -34,12 +34,15 @@ #include #include #include -#include #include #include #include +#ifdef __linux__ +#include +#endif + /* hardcoded number of CPUs */ #define NR_CPUS 16384 diff --git a/tests/test_urcu_lfs.c b/tests/test_urcu_lfs.c index 71229da..252454d 100644 --- a/tests/test_urcu_lfs.c +++ b/tests/test_urcu_lfs.c @@ -34,12 +34,15 @@ #include #include #include -#include #include #include #include +#ifdef __linux__ +#include +#endif + /* hardcoded number of CPUs */ #define NR_CPUS 16384 diff --git a/tests/test_urcu_timing.c b/tests/test_urcu_timing.c index 8e1a810..44235ce 100644 --- a/tests/test_urcu_timing.c +++ b/tests/test_urcu_timing.c @@ -29,10 +29,13 @@ #include #include #include -#include #include #include +#ifdef __linux__ +#include +#endif + #if defined(_syscall0) _syscall0(pid_t, gettid) #elif defined(__NR_gettid) diff --git a/tests/test_urcu_wfq.c b/tests/test_urcu_wfq.c index bcdd4c0..e042f5e 100644 --- a/tests/test_urcu_wfq.c +++ b/tests/test_urcu_wfq.c @@ -34,12 +34,15 @@ #include #include #include -#include #include #include #include +#ifdef __linux__ +#include +#endif + /* hardcoded number of CPUs */ #define NR_CPUS 16384 diff --git a/tests/test_urcu_wfs.c b/tests/test_urcu_wfs.c index dc45700..6d419ca 100644 --- a/tests/test_urcu_wfs.c +++ b/tests/test_urcu_wfs.c @@ -34,12 +34,15 @@ #include #include #include -#include #include #include #include +#ifdef __linux__ +#include +#endif + /* hardcoded number of CPUs */ #define NR_CPUS 16384