diff options
Diffstat (limited to 'nptl/tst-eintr3.c')
-rw-r--r-- | nptl/tst-eintr3.c | 23 |
1 files changed, 7 insertions, 16 deletions
diff --git a/nptl/tst-eintr3.c b/nptl/tst-eintr3.c index d6c4e2bf0d..0562eba4b4 100644 --- a/nptl/tst-eintr3.c +++ b/nptl/tst-eintr3.c @@ -22,11 +22,8 @@ #include <stdio.h> #include <stdlib.h> #include <string.h> - -static int do_test (void); - -#define TEST_FUNCTION do_test () -#include "../test-skeleton.c" +#include <support/check.h> +#include <support/xthread.h> #include "eintr.c" @@ -35,9 +32,9 @@ static void * tf (void *arg) { pthread_mutex_t m = PTHREAD_MUTEX_INITIALIZER; - pthread_mutex_lock (&m); + xpthread_mutex_lock (&m); /* This call must not return. */ - pthread_mutex_lock (&m); + xpthread_mutex_lock (&m); puts ("tf: mutex_lock returned"); exit (1); @@ -51,15 +48,7 @@ do_test (void) setup_eintr (SIGUSR1, &self); - pthread_t th; - char buf[100]; - int e = pthread_create (&th, NULL, tf, NULL); - if (e != 0) - { - printf ("main: pthread_create failed: %s\n", - strerror_r (e, buf, sizeof (buf))); - exit (1); - } + pthread_t th = xpthread_create (NULL, tf, NULL); delayed_exit (1); /* This call must never return. */ @@ -67,3 +56,5 @@ do_test (void) puts ("error: pthread_join returned"); return 1; } + +#include <support/test-driver.c> |