diff options
author | Ulrich Drepper <drepper@redhat.com> | 1999-08-15 18:14:36 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 1999-08-15 18:14:36 +0000 |
commit | 3a9eb648bb714d69623bf0344ae3e6c69b6237f1 (patch) | |
tree | e0eef1f13257d67e2402a228f6f5cae0a773bbd2 /rt/aio_notify.c | |
parent | 0cc70fcf82fefca2d186af4de0b6625a62dd31a0 (diff) | |
download | glibc-3a9eb648bb714d69623bf0344ae3e6c69b6237f1.tar.gz glibc-3a9eb648bb714d69623bf0344ae3e6c69b6237f1.tar.xz glibc-3a9eb648bb714d69623bf0344ae3e6c69b6237f1.zip |
Update.
1999-08-15 Ulrich Drepper <drepper@cygnus.com> * sysdeps/unix/sysv/linux/aio_sigqueue.c: Take extra parameter and initialize si_pid from it. * sysdeps/generic/aio_sigqueue.c (__aio_sigqueue): Take extra parameter. * rt/aio_misc.c (__aio_enqueue_request): Initialize caller_pid. * rt/aio_misc.h (struct waitlist): Add caller_pid element. (struct requestlist): Likewise. Adjust prototypes of __aio_notify_only and __aio_sigqueue. * rt/notify.c (__aio_notify_only): Take extra parameter. Pass it to __aio_sigqueue. (__aio_notify): Pass caller PID to __aio_notify_only. * rt/aio_suspend.c: Initialize caller_pid. * rt/lio_listio.c: Likewise. * rt/lio_listio64.c: Likewise. * rt/lio_listio.c: If nothing has to be done free mutex before signalling. * rt/lio_listio64.c: Likewise.
Diffstat (limited to 'rt/aio_notify.c')
-rw-r--r-- | rt/aio_notify.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/rt/aio_notify.c b/rt/aio_notify.c index 8c57d72e9b..54e9959bfa 100644 --- a/rt/aio_notify.c +++ b/rt/aio_notify.c @@ -1,5 +1,5 @@ /* Notify initiator of AIO request. - Copyright (C) 1997, 1998 Free Software Foundation, Inc. + Copyright (C) 1997, 1998, 1999 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997. @@ -25,7 +25,7 @@ int internal_function -__aio_notify_only (struct sigevent *sigev) +__aio_notify_only (struct sigevent *sigev, pid_t caller_pid) { int result = 0; @@ -51,7 +51,8 @@ __aio_notify_only (struct sigevent *sigev) } else if (sigev->sigev_notify == SIGEV_SIGNAL) /* We have to send a signal. */ - if (__aio_sigqueue (sigev->sigev_signo, sigev->sigev_value) < 0) + if (__aio_sigqueue (sigev->sigev_signo, sigev->sigev_value, caller_pid) + < 0) result = -1; return result; @@ -65,7 +66,7 @@ __aio_notify (struct requestlist *req) struct waitlist *waitlist; struct aiocb *aiocbp = &req->aiocbp->aiocb; - if (__aio_notify_only (&aiocbp->aio_sigevent) != 0) + if (__aio_notify_only (&aiocbp->aio_sigevent, req->caller_pid) != 0) { /* XXX What shall we do if already an error is set by read/write/fsync? */ @@ -89,7 +90,7 @@ __aio_notify (struct requestlist *req) this request is the last one, send the signal. */ if (*waitlist->counterp == 0) { - __aio_notify_only (waitlist->sigevp); + __aio_notify_only (waitlist->sigevp, waitlist->caller_pid); /* This is tricky. See lio_listio.c for the reason why this works. */ free ((void *) waitlist->counterp); |