aboutsummaryrefslogtreecommitdiff
path: root/rt/tst-aio2.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2004-12-22 20:10:10 +0000
committerUlrich Drepper <drepper@redhat.com>2004-12-22 20:10:10 +0000
commita334319f6530564d22e775935d9c91663623a1b4 (patch)
treeb5877475619e4c938e98757d518bb1e9cbead751 /rt/tst-aio2.c
parent0ecb606cb6cf65de1d9fc8a919bceb4be476c602 (diff)
downloadglibc-a334319f6530564d22e775935d9c91663623a1b4.tar
glibc-a334319f6530564d22e775935d9c91663623a1b4.tar.gz
glibc-a334319f6530564d22e775935d9c91663623a1b4.tar.bz2
glibc-a334319f6530564d22e775935d9c91663623a1b4.zip
(CFLAGS-tst-align.c): Add -mpreferred-stack-boundary=4.
Diffstat (limited to 'rt/tst-aio2.c')
-rw-r--r--rt/tst-aio2.c25
1 files changed, 5 insertions, 20 deletions
diff --git a/rt/tst-aio2.c b/rt/tst-aio2.c
index 79076396a4..1ff92ce93b 100644
--- a/rt/tst-aio2.c
+++ b/rt/tst-aio2.c
@@ -1,5 +1,5 @@
/* Test for notification mechanism in lio_listio.
- Copyright (C) 2000, 2002, 2006 Free Software Foundation, Inc.
+ Copyright (C) 2000,02 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 2000.
@@ -25,19 +25,13 @@
#include <unistd.h>
#include <errno.h>
-
-static pthread_barrier_t b;
+int flag;
static void
thrfct (sigval_t arg)
{
- int e = pthread_barrier_wait (&b);
- if (e != 0 && e != PTHREAD_BARRIER_SERIAL_THREAD)
- {
- puts ("thread: barrier_wait failed");
- exit (1);
- }
+ flag = 1;
}
@@ -59,12 +53,6 @@ do_test (int argc, char *argv[])
unlink (name);
- if (pthread_barrier_init (&b, NULL, 2) != 0)
- {
- puts ("barrier_init failed");
- return 1;
- }
-
arr[0] = &cb;
cb.aio_fildes = fd;
@@ -89,12 +77,9 @@ do_test (int argc, char *argv[])
return 1;
}
- puts ("lio_listio returned");
-
- int e = pthread_barrier_wait (&b);
- if (e != 0 && e != PTHREAD_BARRIER_SERIAL_THREAD)
+ if (flag != 0)
{
- puts ("barrier_wait failed");
+ puts ("thread created, should not have happened");
return 1;
}