Re: aioUnlink(NULL, NULL, NULL);

From: David Luyer <luyer@dont-contact.us>
Date: Fri, 04 Sep 1998 12:57:22 +0800

> Hello async-gurus,
>
> Could you please explain why aioCheckCallbacks() calls
> aioUnlink(NULL, NULL, NULL);

From a quick look at the code you posted, and a look at aioCheckCallBacks();

> void
> aioUnlink(const char *path, AIOCB * callback, void *callback_data)
> {
> static aio_unlinkq_t *uq = NULL;
      ^^^^^^
> while (uq != NULL) {
> ....
> }

You missed this point. aioCheckCallbacks() notices uq is not empty (since
there are _AIO_UNLINK operations waiting), and calls aioUnlink(), not
queueing any new unlinks but to do some more exisiting ones.

aioUnlink() can return in a couple of ways without completing to the point
where uq == NULL; uq is static so it is maintained between calls.

(I'm sure you know most of this, just not sure which bit you missed...)

David.
Received on Tue Jul 29 2003 - 13:15:53 MDT

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:11:54 MST