diff options
author | Ulrich Drepper <drepper@redhat.com> | 2003-02-08 19:44:33 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2003-02-08 19:44:33 +0000 |
commit | 696e556ea9b85beb8e6bad132d3d4dbdb5ab36a6 (patch) | |
tree | 4db6b271413792b54210ce0a214668cdde164d41 /nptl/tst-basic2.c | |
parent | 34c86f425441d13e9e6cebd2ce1ebd99fc373ce2 (diff) | |
download | glibc-696e556ea9b85beb8e6bad132d3d4dbdb5ab36a6.tar glibc-696e556ea9b85beb8e6bad132d3d4dbdb5ab36a6.tar.gz glibc-696e556ea9b85beb8e6bad132d3d4dbdb5ab36a6.tar.bz2 glibc-696e556ea9b85beb8e6bad132d3d4dbdb5ab36a6.zip |
Update.
2003-02-08 Ulrich Drepper <drepper@redhat.com>
* tst-cond2.c: Rearrange code to not rely on behavior undefined
according to POSIX.
* tst-basic2.c (do_test): Lock mutex before creating the thread.
Diffstat (limited to 'nptl/tst-basic2.c')
-rw-r--r-- | nptl/tst-basic2.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/nptl/tst-basic2.c b/nptl/tst-basic2.c index ffb19289b8..9bc20602d6 100644 --- a/nptl/tst-basic2.c +++ b/nptl/tst-basic2.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. @@ -58,6 +58,12 @@ do_test (void) exit (1); } + if (pthread_mutex_lock (&lock[i]) != 0) + { + puts ("mutex_lock failed"); + exit (1); + } + if (pthread_create (&th[i], NULL, tf, (void *) i) != 0) { puts ("create failed"); |