gettid is defined in rt-utils, so we should use that everywhere instead of defining a separate macro in each test for it. Signed-off-by: John Kacur <jkacur@xxxxxxxxxx> --- src/cyclictest/cyclictest.c | 2 -- src/pmqtest/pmqtest.c | 2 -- src/ptsematest/ptsematest.c | 2 -- src/rt-migrate-test/rt-migrate-test.c | 2 -- src/signaltest/signaltest.c | 3 --- src/sigwaittest/sigwaittest.c | 2 -- src/svsematest/svsematest.c | 2 -- 7 files changed, 15 deletions(-) diff --git a/src/cyclictest/cyclictest.c b/src/cyclictest/cyclictest.c index 03d56e4f520c..83f169d381b7 100644 --- a/src/cyclictest/cyclictest.c +++ b/src/cyclictest/cyclictest.c @@ -54,8 +54,6 @@ #define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0])) -/* Ugly, but .... */ -#define gettid() syscall(__NR_gettid) #define sigev_notify_thread_id _sigev_un._tid #ifdef __UCLIBC__ diff --git a/src/pmqtest/pmqtest.c b/src/pmqtest/pmqtest.c index 054768d161a7..2191710961fe 100644 --- a/src/pmqtest/pmqtest.c +++ b/src/pmqtest/pmqtest.c @@ -41,8 +41,6 @@ #include <pthread.h> -#define gettid() syscall(__NR_gettid) - #define USEC_PER_SEC 1000000 #define SYNCMQ_NAME "/syncmsg%d" diff --git a/src/ptsematest/ptsematest.c b/src/ptsematest/ptsematest.c index 6bedbc81b572..e8a3177b63dd 100644 --- a/src/ptsematest/ptsematest.c +++ b/src/ptsematest/ptsematest.c @@ -40,8 +40,6 @@ #include <pthread.h> -#define gettid() syscall(__NR_gettid) - #define USEC_PER_SEC 1000000 enum { diff --git a/src/rt-migrate-test/rt-migrate-test.c b/src/rt-migrate-test/rt-migrate-test.c index 8223d6669a37..f0a285d1d45f 100644 --- a/src/rt-migrate-test/rt-migrate-test.c +++ b/src/rt-migrate-test/rt-migrate-test.c @@ -43,8 +43,6 @@ #include <pthread.h> #include "rt-utils.h" -#define gettid() syscall(__NR_gettid) - int nr_tasks; int lfd; diff --git a/src/signaltest/signaltest.c b/src/signaltest/signaltest.c index a168191b7573..4c952561d7f2 100644 --- a/src/signaltest/signaltest.c +++ b/src/signaltest/signaltest.c @@ -32,9 +32,6 @@ #define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0])) -/* Ugly, but .... */ -#define gettid() syscall(__NR_gettid) - #define USEC_PER_SEC 1000000 #define NSEC_PER_SEC 1000000000 diff --git a/src/sigwaittest/sigwaittest.c b/src/sigwaittest/sigwaittest.c index 6e3c28330447..4579f903c909 100644 --- a/src/sigwaittest/sigwaittest.c +++ b/src/sigwaittest/sigwaittest.c @@ -41,8 +41,6 @@ #include <pthread.h> -#define gettid() syscall(__NR_gettid) - #define USEC_PER_SEC 1000000 enum { diff --git a/src/svsematest/svsematest.c b/src/svsematest/svsematest.c index dfa4660c0e43..01083d13dde6 100644 --- a/src/svsematest/svsematest.c +++ b/src/svsematest/svsematest.c @@ -44,8 +44,6 @@ #include "rt-get_cpu.h" #include "error.h" -#define gettid() syscall(__NR_gettid) - #define USEC_PER_SEC 1000000 #define SEM_WAIT_FOR_RECEIVER 0 -- 2.20.1