From: Roland McGrath Date: Fri, 6 Feb 2015 20:21:38 +0000 (-0800) Subject: Clean up nptl/tst-join5 use of nanosleep. X-Git-Tag: glibc-2.22~656 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ca0e0675a7d203cfd047fd9f3137b6713defef84;p=thirdparty%2Fglibc.git Clean up nptl/tst-join5 use of nanosleep. --- diff --git a/ChangeLog b/ChangeLog index 94a3907a272..c28f7e542ed 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2015-02-06 Roland McGrath + * nptl/tst-join5.c: Drop #include . + (wait_code): New function replaces macro. + Call nanosleep rather than syscall. + * nptl/pt-system.c: Rewritten. Put everything under [SHLIB_COMPAT (libpthread, GLIBC_2_0, GLIBC_2_22)]. Use IFUNC to redirect when possible. diff --git a/nptl/tst-join5.c b/nptl/tst-join5.c index e83f8958c00..b45d2106298 100644 --- a/nptl/tst-join5.c +++ b/nptl/tst-join5.c @@ -22,15 +22,15 @@ #include #include #include -#include -#define wait_code() \ - do { \ - struct timespec ts = { .tv_sec = 0, .tv_nsec = 200000000 }; \ - while (syscall (__NR_nanosleep, &ts, &ts) < 0) \ - /* nothing */; \ - } while (0) +static void +wait_code (void) +{ + struct timespec ts = { .tv_sec = 0, .tv_nsec = 200000000 }; + while (nanosleep (&ts, &ts) < 0) + ; +} #ifdef WAIT_IN_CHILD