summaryrefslogtreecommitdiff
path: root/nptl/tst-exit1.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2003-02-27 21:48:41 +0000
committerUlrich Drepper <drepper@redhat.com>2003-02-27 21:48:41 +0000
commitabeb3007995ecbac79e4a8ff4cf127edf1b974ea (patch)
tree2bc4cfc0e18f477b3338f35c6dba18bf45a446d6 /nptl/tst-exit1.c
parent73a061bbe9b6a6c79d0a777d81c376306b5da98d (diff)
(do_test): Don't start more than one thread in parallel.
Diffstat (limited to 'nptl/tst-exit1.c')
-rw-r--r--nptl/tst-exit1.c18
1 files changed, 8 insertions, 10 deletions
diff --git a/nptl/tst-exit1.c b/nptl/tst-exit1.c
index 5113f2dd2d..0081f32c2e 100644
--- a/nptl/tst-exit1.c
+++ b/nptl/tst-exit1.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002 Free Software Foundation, Inc.
+/* Copyright (C) 2002, 2003 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
@@ -52,14 +52,12 @@ do_test (void)
exit (1);
}
- pthread_t th[N];
- int i;
- for (i = 0; i < N; ++i)
- if (pthread_create (&th[i], NULL, tf, NULL) != 0)
- {
- puts ("create failed");
- exit (1);
- }
+ pthread_t th;
+ if (pthread_create (&th, NULL, tf, NULL) != 0)
+ {
+ puts ("create failed");
+ exit (1);
+ }
int r = pthread_barrier_wait (&b);
if (r != 0 && r != PTHREAD_BARRIER_SERIAL_THREAD)
@@ -69,7 +67,7 @@ do_test (void)
}
/* Do nothing. */
- if (pthread_join (th[0], NULL) == 0)
+ if (pthread_join (th, NULL) == 0)
{
puts ("join succeeded!?");
exit (1);