mirror of
https://sourceware.org/git/glibc.git
synced 2025-07-30 22:43:12 +03:00
Update.
* sysdeps/pthread/aio_suspend.c (aio_suspend): Don't quite remove any, but unify the test.
This commit is contained in:
@ -1,7 +1,7 @@
|
|||||||
2003-01-02 Ulrich Drepper <drepper@redhat.com>
|
2003-01-02 Ulrich Drepper <drepper@redhat.com>
|
||||||
|
|
||||||
* sysdeps/pthread/aio_suspend.c (aio_suspend): Simplify by
|
* sysdeps/pthread/aio_suspend.c (aio_suspend): Don't quite remove
|
||||||
removing 'any' variable.
|
any, but unify the test.
|
||||||
|
|
||||||
2003-01-02 Jakub Jelinek <jakub@redhat.com>
|
2003-01-02 Jakub Jelinek <jakub@redhat.com>
|
||||||
|
|
||||||
|
@ -31,6 +31,7 @@
|
|||||||
|
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
|
#include <stdbool.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <sys/time.h>
|
#include <sys/time.h>
|
||||||
|
|
||||||
@ -47,6 +48,7 @@ aio_suspend (list, nent, timeout)
|
|||||||
struct requestlist *requestlist[nent];
|
struct requestlist *requestlist[nent];
|
||||||
pthread_cond_t cond = PTHREAD_COND_INITIALIZER;
|
pthread_cond_t cond = PTHREAD_COND_INITIALIZER;
|
||||||
int cnt;
|
int cnt;
|
||||||
|
bool any = false;
|
||||||
int result = 0;
|
int result = 0;
|
||||||
int dummy;
|
int dummy;
|
||||||
|
|
||||||
@ -70,6 +72,7 @@ aio_suspend (list, nent, timeout)
|
|||||||
waitlist[cnt].sigevp = NULL;
|
waitlist[cnt].sigevp = NULL;
|
||||||
waitlist[cnt].caller_pid = 0; /* Not needed. */
|
waitlist[cnt].caller_pid = 0; /* Not needed. */
|
||||||
requestlist[cnt]->waiting = &waitlist[cnt];
|
requestlist[cnt]->waiting = &waitlist[cnt];
|
||||||
|
any = true;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
/* We will never suspend. */
|
/* 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. */
|
/* Only if none of the entries is NULL or finished to be wait. */
|
||||||
if (cnt == nent)
|
if (cnt == nent && any)
|
||||||
{
|
{
|
||||||
int oldstate;
|
int oldstate;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user