From: Ulrich Drepper Date: Fri, 3 Jan 2003 06:51:18 +0000 (+0000) Subject: Update. X-Git-Tag: cvs/glibc-2_3_2~397 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c547b58aad05c0dea96a54ad95d806f76dfd72f5;p=thirdparty%2Fglibc.git Update. * sysdeps/pthread/aio_suspend.c (aio_suspend): Don't quite remove any, but unify the test. --- diff --git a/ChangeLog b/ChangeLog index b4126a07e85..3e34ff3e975 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,7 +1,7 @@ 2003-01-02 Ulrich Drepper - * sysdeps/pthread/aio_suspend.c (aio_suspend): Simplify by - removing 'any' variable. + * sysdeps/pthread/aio_suspend.c (aio_suspend): Don't quite remove + any, but unify the test. 2003-01-02 Jakub Jelinek diff --git a/sysdeps/pthread/aio_suspend.c b/sysdeps/pthread/aio_suspend.c index 1a3ec7cc04f..ffc1c64703f 100644 --- a/sysdeps/pthread/aio_suspend.c +++ b/sysdeps/pthread/aio_suspend.c @@ -31,6 +31,7 @@ #include #include +#include #include #include @@ -47,6 +48,7 @@ aio_suspend (list, nent, timeout) struct requestlist *requestlist[nent]; pthread_cond_t cond = PTHREAD_COND_INITIALIZER; int cnt; + bool any = false; int result = 0; int dummy; @@ -70,6 +72,7 @@ aio_suspend (list, nent, timeout) waitlist[cnt].sigevp = NULL; waitlist[cnt].caller_pid = 0; /* Not needed. */ requestlist[cnt]->waiting = &waitlist[cnt]; + any = true; } else /* We will never suspend. */ @@ -82,7 +85,7 @@ aio_suspend (list, nent, timeout) /* Only if none of the entries is NULL or finished to be wait. */ - if (cnt == nent) + if (cnt == nent && any) { int oldstate;