diff options
author | Jakub Jelinek <jakub@redhat.com> | 2006-01-06 09:23:26 +0000 |
---|---|---|
committer | Jakub Jelinek <jakub@redhat.com> | 2006-01-06 09:23:26 +0000 |
commit | dd486f53ee367e1667c61ec1fffdb59f9a8130e9 (patch) | |
tree | 6e85e00b5a067e5717c98dcadbcc6303118ffad7 /sysdeps/pthread/aio_notify.c | |
parent | 04c414477bd220f2c842453314a6dbb928e3c9e6 (diff) | |
download | glibc-dd486f53ee367e1667c61ec1fffdb59f9a8130e9.tar glibc-dd486f53ee367e1667c61ec1fffdb59f9a8130e9.tar.gz glibc-dd486f53ee367e1667c61ec1fffdb59f9a8130e9.tar.bz2 glibc-dd486f53ee367e1667c61ec1fffdb59f9a8130e9.zip |
Updated to fedora-glibc-20060106T0916cvs/fedora-glibc-2_3_90-28
Diffstat (limited to 'sysdeps/pthread/aio_notify.c')
-rw-r--r-- | sysdeps/pthread/aio_notify.c | 22 |
1 files changed, 15 insertions, 7 deletions
diff --git a/sysdeps/pthread/aio_notify.c b/sysdeps/pthread/aio_notify.c index 877e8d9363..3f7f70ef7c 100644 --- a/sysdeps/pthread/aio_notify.c +++ b/sysdeps/pthread/aio_notify.c @@ -1,6 +1,5 @@ /* Notify initiator of AIO request. - Copyright (C) 1997, 1998, 1999, 2000, 2001, 2003, 2004 - Free Software Foundation, Inc. + Copyright (C) 1997-2001, 2003, 2004, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997. @@ -144,15 +143,24 @@ __aio_notify (struct requestlist *req) { struct waitlist *next = waitlist->next; - /* Decrement the counter. This is used in both cases. */ - --*waitlist->counterp; - if (waitlist->sigevp == NULL) - pthread_cond_signal (waitlist->cond); + { + if (waitlist->result != NULL && aiocbp->__return_value == -1) + *waitlist->result = -1; + +#ifdef DONT_NEED_AIO_MISC_COND + AIO_MISC_NOTIFY (waitlist); +#else + /* Decrement the counter. */ + --*waitlist->counterp; + + pthread_cond_signal (waitlist->cond); +#endif + } else /* This is part of a asynchronous `lio_listio' operation. If this request is the last one, send the signal. */ - if (*waitlist->counterp == 0) + if (--*waitlist->counterp == 0) { #ifdef BROKEN_THREAD_SIGNALS __aio_notify_only (waitlist->sigevp, waitlist->caller_pid); |