diff options
author | Ulrich Drepper <drepper@redhat.com> | 2004-12-22 20:10:10 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2004-12-22 20:10:10 +0000 |
commit | a334319f6530564d22e775935d9c91663623a1b4 (patch) | |
tree | b5877475619e4c938e98757d518bb1e9cbead751 /sysdeps/pthread/aio_notify.c | |
parent | 0ecb606cb6cf65de1d9fc8a919bceb4be476c602 (diff) | |
download | glibc-a334319f6530564d22e775935d9c91663623a1b4.tar glibc-a334319f6530564d22e775935d9c91663623a1b4.tar.gz glibc-a334319f6530564d22e775935d9c91663623a1b4.tar.bz2 glibc-a334319f6530564d22e775935d9c91663623a1b4.zip |
(CFLAGS-tst-align.c): Add -mpreferred-stack-boundary=4.
Diffstat (limited to 'sysdeps/pthread/aio_notify.c')
-rw-r--r-- | sysdeps/pthread/aio_notify.c | 22 |
1 files changed, 7 insertions, 15 deletions
diff --git a/sysdeps/pthread/aio_notify.c b/sysdeps/pthread/aio_notify.c index 3f7f70ef7c..877e8d9363 100644 --- a/sysdeps/pthread/aio_notify.c +++ b/sysdeps/pthread/aio_notify.c @@ -1,5 +1,6 @@ /* Notify initiator of AIO request. - Copyright (C) 1997-2001, 2003, 2004, 2006 Free Software Foundation, Inc. + Copyright (C) 1997, 1998, 1999, 2000, 2001, 2003, 2004 + Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997. @@ -143,24 +144,15 @@ __aio_notify (struct requestlist *req) { struct waitlist *next = waitlist->next; - if (waitlist->sigevp == NULL) - { - 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; + /* Decrement the counter. This is used in both cases. */ + --*waitlist->counterp; - pthread_cond_signal (waitlist->cond); -#endif - } + if (waitlist->sigevp == NULL) + pthread_cond_signal (waitlist->cond); 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); |