diff options
author | Ulrich Drepper <drepper@redhat.com> | 2003-01-03 06:51:18 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2003-01-03 06:51:18 +0000 |
commit | c547b58aad05c0dea96a54ad95d806f76dfd72f5 (patch) | |
tree | 25f0ca1f910846466107cb8130c2b80a5505da9f /sysdeps/pthread/aio_suspend.c | |
parent | 8ee8768079f06d1e830ff9775903b5b89affcda6 (diff) | |
download | glibc-c547b58aad05c0dea96a54ad95d806f76dfd72f5.tar.gz glibc-c547b58aad05c0dea96a54ad95d806f76dfd72f5.tar.xz glibc-c547b58aad05c0dea96a54ad95d806f76dfd72f5.zip |
Update.
* sysdeps/pthread/aio_suspend.c (aio_suspend): Don't quite remove any, but unify the test.
Diffstat (limited to 'sysdeps/pthread/aio_suspend.c')
-rw-r--r-- | sysdeps/pthread/aio_suspend.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sysdeps/pthread/aio_suspend.c b/sysdeps/pthread/aio_suspend.c index 1a3ec7cc04..ffc1c64703 100644 --- a/sysdeps/pthread/aio_suspend.c +++ b/sysdeps/pthread/aio_suspend.c @@ -31,6 +31,7 @@ #include <assert.h> #include <errno.h> +#include <stdbool.h> #include <stdlib.h> #include <sys/time.h> @@ -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; |