about summary refs log tree commit diff
path: root/rt/lio_listio.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2001-03-03 18:21:04 +0000
committerUlrich Drepper <drepper@redhat.com>2001-03-03 18:21:04 +0000
commit2ace57217028da99fc98f79ae0a625a1ec842724 (patch)
treee7d7c34d61fae3e134dcb1029dfd901cae2c2ddc /rt/lio_listio.c
parent28b20578c97c8d53cc339446fdab31818cf701f6 (diff)
downloadglibc-2ace57217028da99fc98f79ae0a625a1ec842724.tar.gz
glibc-2ace57217028da99fc98f79ae0a625a1ec842724.tar.xz
glibc-2ace57217028da99fc98f79ae0a625a1ec842724.zip
Update.
	* Versions.def: Add libanl definition.
	* shlig-versions: Add entry for libanl.
	* resolv/Makefile (distribute): Add gai_misc.h and ga_test.c.
	(routines): Add gai_sigqueue.
	(extra-libs): Add libanl.
	(libanl-routines): New variable.
	Add rules to build libanl and ga_test.
	* resolv/Versions [libc] (GLIBC_2.2.3): Add __gai_sigqueue.
	[libanl]: New library.
	* resolv/netdb.h: Add definitions for libanl.
	* resolv/getaddrinfo_a.c: New file.
	* resolv/gai_cancel.c: New file.
	* resolv/gai_error.c: New file.
	* resolv/gai_misc.c: New file.
	* resolv/gai_misc.h: New file.
	* resolv/gai_notify.c: New file.
	* resolv/gai_suspend.c: New file.
	* resolv/ga_test.c: New file.
	* sysdeps/generic/gai_sigqueue.c: New file.
	* sysdeps/unix/sysv/linux/gai_sigqueue.c: New file.
	* sysdeps/generic/bits/siginfo.h: Allow __need_sigevent_t being defined
	and provide only that definition.
	* sysdeps/unix/sysv/linux/alpha/bits/siginfo.h: Likewise.
	* sysdeps/unix/sysv/linux/bits/siginfo.h: Likewise.
	* sysdeps/unix/sysv/linux/ia64/bits/siginfo.h: Likewise.
	* sysdeps/unix/sysv/linux/mips/bits/siginfo.h: Likewise.
	* sysdeps/unix/sysv/linux/sparc/bits/siginfo.h: Likewise.
	* sysdeps/unix/sysv/linux/sparc/sparc64/bits/siginfo.h: Likewise.

	* rt/aio_misc.c: Fix typos in comments.
	* rt/lio_listio.c: Pretty printing.  Little optimization in request
	list handling.

	* elf/rtld.c: Remove commented out code.
Diffstat (limited to 'rt/lio_listio.c')
-rw-r--r--rt/lio_listio.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/rt/lio_listio.c b/rt/lio_listio.c
index 37ddb84ef5..aa267a8e31 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, 2000 Free Software Foundation, Inc.
+   Copyright (C) 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
 
@@ -70,8 +70,8 @@ lio_listio (mode, list, nent, sig)
     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);
+	requests[cnt] = __aio_enqueue_request ((aiocb_union *) list[cnt],
+					       list[cnt]->aio_lio_opcode);
 
 	if (requests[cnt] != NULL)
 	  /* Successfully enqueued.  */
@@ -81,6 +81,8 @@ lio_listio (mode, list, nent, sig)
 	     of the aiocb will tell more.  */
 	  result = -1;
       }
+    else
+      requests[cnt] = NULL;
 
   if (total == 0)
     {
@@ -106,8 +108,7 @@ lio_listio (mode, list, nent, sig)
 
       total = 0;
       for (cnt = 0; cnt < nent; ++cnt)
-	if (list[cnt] != NULL && list[cnt]->aio_lio_opcode != LIO_NOP
-	    && requests[cnt] != NULL)
+	if (requests[cnt] != NULL && list[cnt]->aio_lio_opcode != LIO_NOP)
 	  {
 	    waitlist[cnt].cond = &cond;
 	    waitlist[cnt].next = requests[cnt]->waiting;
@@ -153,8 +154,7 @@ lio_listio (mode, list, nent, sig)
 	  total = 0;
 
 	  for (cnt = 0; cnt < nent; ++cnt)
-	    if (list[cnt] != NULL && list[cnt]->aio_lio_opcode != LIO_NOP
-		&& requests[cnt] != NULL)
+	    if (requests[cnt] != NULL && list[cnt]->aio_lio_opcode != LIO_NOP)
 	      {
 		waitlist->list[cnt].cond = NULL;
 		waitlist->list[cnt].next = requests[cnt]->waiting;