diff options
author | Ulrich Drepper <drepper@redhat.com> | 1998-04-11 20:19:13 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 1998-04-11 20:19:13 +0000 |
commit | 6b9c2e671c08bd80606d9da81aee00bb03c44f90 (patch) | |
tree | 9152632246378cff143bd87c197cc5785600b334 /rt/lio_listio.c | |
parent | 18de8c733f47eedd3ccb9705c2d3bb8464025588 (diff) | |
download | glibc-6b9c2e671c08bd80606d9da81aee00bb03c44f90.tar.gz glibc-6b9c2e671c08bd80606d9da81aee00bb03c44f90.tar.xz glibc-6b9c2e671c08bd80606d9da81aee00bb03c44f90.zip |
Update.
* rt/tst-aio.c: Add test for aio_read and lio_listio. * rt/lio_listio.c: Correct total counter handling. * rt/aio_misc.c (handle_fildes_io): Correctly dequeue elements from request queue. * test-skeleton.c (main): Make stdout unbuffered. Improve message of signal on exit even more.
Diffstat (limited to 'rt/lio_listio.c')
-rw-r--r-- | rt/lio_listio.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/rt/lio_listio.c b/rt/lio_listio.c index e4d972960f..03c3bf2f6b 100644 --- a/rt/lio_listio.c +++ b/rt/lio_listio.c @@ -93,7 +93,7 @@ lio_listio (mode, list, nent, sig) { waitlist[cnt].cond = &cond; waitlist[cnt].next = requests[cnt]->waiting; - waitlist[cnt].counterp = NULL; + waitlist[cnt].counterp = &total; waitlist[cnt].sigevp = NULL; requests[cnt]->waiting = &waitlist[cnt]; ++total; @@ -105,8 +105,7 @@ lio_listio (mode, list, nent, sig) pthread_setcancelstate (PTHREAD_CANCEL_DISABLE, &oldstate); while (total > 0) - if (pthread_cond_wait (&cond, &__aio_requests_mutex) == 0) - --total; + pthread_cond_wait (&cond, &__aio_requests_mutex); /* Now it's time to restore the cancelation state. */ pthread_setcancelstate (oldstate, NULL); |