about summary refs log tree commit diff
path: root/rt/lio_listio.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2000-07-26 06:30:30 +0000
committerUlrich Drepper <drepper@redhat.com>2000-07-26 06:30:30 +0000
commit025a5afa2df2c13cd5a35ffb15acdf61b6ebb681 (patch)
tree174e7214dfb2ed94ba98b2f792623ba8d85ec020 /rt/lio_listio.c
parentb7ed26c6633ae836938d056490ab4efaa0749af0 (diff)
downloadglibc-025a5afa2df2c13cd5a35ffb15acdf61b6ebb681.tar.gz
glibc-025a5afa2df2c13cd5a35ffb15acdf61b6ebb681.tar.xz
glibc-025a5afa2df2c13cd5a35ffb15acdf61b6ebb681.zip
Update.
	* rt/lio_listio.c (lio_listio): Always disable individual
	notification.
	* rt/Makefile: Add rules to build and run tst-aio2.
	* rt/tst-aio2.c: New file.
Diffstat (limited to 'rt/lio_listio.c')
-rw-r--r--rt/lio_listio.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/rt/lio_listio.c b/rt/lio_listio.c
index 13d1b79a58..37ddb84ef5 100644
--- a/rt/lio_listio.c
+++ b/rt/lio_listio.c
@@ -1,5 +1,5 @@
 /* Enqueue and list of read or write requests.
-   Copyright (C) 1997, 1998, 1999 Free Software Foundation, Inc.
+   Copyright (C) 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
 
@@ -42,6 +42,7 @@ lio_listio (mode, list, nent, sig)
      int nent;
      struct sigevent *sig;
 {
+  struct sigevent defsigev;
   struct requestlist *requests[nent];
   int cnt;
   volatile int total = 0;
@@ -54,6 +55,12 @@ lio_listio (mode, list, nent, sig)
       return -1;
     }
 
+  if (sig == NULL)
+    {
+      defsigev.sigev_notify = SIGEV_NONE;
+      sig = &defsigev;
+    }
+
   /* Request the mutex.  */
   pthread_mutex_lock (&__aio_requests_mutex);
 
@@ -62,6 +69,7 @@ lio_listio (mode, list, nent, sig)
   for (cnt = 0; cnt < nent; ++cnt)
     if (list[cnt] != NULL && list[cnt]->aio_lio_opcode != LIO_NOP)
       {
+	list[cnt]->aio_sigevent.sigev_notify = SIGEV_NONE;
 	requests[cnt] =  __aio_enqueue_request ((aiocb_union *) list[cnt],
 						list[cnt]->aio_lio_opcode);