From edf205d5ef1528247fde0637572a4631e0f1a5c2 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 11 May 2003 23:28:52 +0000 Subject: Update. * io/Makefile ($(objpfx)ftwtest.out): Use absolute file names. 2003-05-11 Ulrich Drepper * time/tst-strftime.c (do_test): Add tests for - flag. 2003-05-11 Jim Meyering * 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 --- nptl/ChangeLog | 4 ++++ nptl/cond-perf.c | 4 +++- 2 files changed, 7 insertions(+), 1 deletion(-) (limited to 'nptl') diff --git a/nptl/ChangeLog b/nptl/ChangeLog index 93409bd..78943b3 100644 --- a/nptl/ChangeLog +++ b/nptl/ChangeLog @@ -1,3 +1,7 @@ +2003-05-11 Ulrich Drepper + + * cond-perf.c (cons): Add missing locking around setting of alldone. + 2003-05-10 Ulrich Drepper * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Remove futex diff --git a/nptl/cond-perf.c b/nptl/cond-perf.c index c3305b3..53d8563 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) -- cgit v1.1