aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/pthread/aio_notify.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2006-01-06 03:08:04 +0000
committerUlrich Drepper <drepper@redhat.com>2006-01-06 03:08:04 +0000
commit679d83bac2f4bed0e398122fdf3e05ce261e16b7 (patch)
tree9b40b6068a156c300bcb260453a97ae1168ae6db /sysdeps/pthread/aio_notify.c
parent17041e4ff09d3a9308c15bdfc2e63e629d9b364b (diff)
downloadglibc-679d83bac2f4bed0e398122fdf3e05ce261e16b7.tar
glibc-679d83bac2f4bed0e398122fdf3e05ce261e16b7.tar.gz
glibc-679d83bac2f4bed0e398122fdf3e05ce261e16b7.tar.bz2
glibc-679d83bac2f4bed0e398122fdf3e05ce261e16b7.zip
* sysdeps/pthread/aio_misc.h [!DONT_USE_BOOTSTRAP_MAP]
(struct waitlist): Don't add cond. * sysdeps/pthread/aio_notify.c [!DONT_USE_BOOTSTRAP_MAP] (__aio_notify): Use AIO_MISC_NOTIFY instead of pthread_cond_signal. * sysdeps/pthread/aio_suspend.c [!DONT_USE_BOOTSTRAP_MAP]: Don't use condvar, use AIO_MISC_WAIT. * sysdeps/pthread/lio_listio.c: Likewise. * rt/Makefile (tests): Add aio_suspend. * rt/tst-aio9.c: New file.
Diffstat (limited to 'sysdeps/pthread/aio_notify.c')
-rw-r--r--sysdeps/pthread/aio_notify.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/sysdeps/pthread/aio_notify.c b/sysdeps/pthread/aio_notify.c
index 4d2611f0a1..3f7f70ef7c 100644
--- a/sysdeps/pthread/aio_notify.c
+++ b/sysdeps/pthread/aio_notify.c
@@ -143,20 +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)
{
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);