about summary refs log tree commit diff
path: root/nptl/cond-perf.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2003-05-11 23:28:52 +0000
committerUlrich Drepper <drepper@redhat.com>2003-05-11 23:28:52 +0000
commitedf205d5ef1528247fde0637572a4631e0f1a5c2 (patch)
tree9368f153f59da072509167b1ca5adbe07c114b61 /nptl/cond-perf.c
parentef3a0fcdad439948e501e951e8b1055e4971d008 (diff)
downloadglibc-edf205d5ef1528247fde0637572a4631e0f1a5c2.tar.gz
glibc-edf205d5ef1528247fde0637572a4631e0f1a5c2.tar.xz
glibc-edf205d5ef1528247fde0637572a4631e0f1a5c2.zip
Update.
	* io/Makefile ($(objpfx)ftwtest.out): Use absolute file names.

2003-05-11  Ulrich Drepper  <drepper@redhat.com>

	* time/tst-strftime.c (do_test): Add tests for - flag.

2003-05-11  Jim Meyering  <jim@meyering.net>

	* time/strftime.c (my_strftime): Let the `-' (no-pad) flag affect
        the space-padded-by-default conversion specifiers, %e, %k, %l.

2003-05-11  Andreas Schwab  <schwab@suse.de>
Diffstat (limited to 'nptl/cond-perf.c')
-rw-r--r--nptl/cond-perf.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/nptl/cond-perf.c b/nptl/cond-perf.c
index c3305b391d..53d85637b8 100644
--- a/nptl/cond-perf.c
+++ b/nptl/cond-perf.c
@@ -25,8 +25,10 @@ cons (void *arg)
     {
       if (--ntogo == 0)
 	{
+	  pthread_mutex_lock (&mut2);
 	  alldone = true;
 	  pthread_cond_signal (&cond2);
+	  pthread_mutex_unlock (&mut2);
 	}
 
       pthread_cond_wait (&cond1, &mut1);
@@ -67,7 +69,7 @@ main (int argc, char *argv[])
   pthread_t th[nthreads];
   int i;
   for (i = 0; i < nthreads; ++i)
-    if ((err = pthread_create (&th[i], NULL, cons, (void *) (long) i)) != 0)
+    if (__builtin_expect ((err = pthread_create (&th[i], NULL, cons, (void *) (long) i)) != 0, 0))
       printf ("pthread_create: %s\n", strerror (err));
 
   for (i = 0; i < nrounds; ++i)