Re: aioUnlink(NULL, NULL, NULL);

From: Michael O'Reilly <michael@dont-contact.us>
Date: 04 Sep 1998 13:00:04 +0800

Alex Rousskov <rousskov@nlanr.net> writes:
> Hello async-gurus,
>
> Could you please explain why aioCheckCallbacks() calls
> aioUnlink(NULL, NULL, NULL);
>
> With all three parameters being NULL, aioUnlink() does nothing as far as I
> can see:
>
> void
> aioUnlink(const char *path, AIOCB * callback, void *callback_data)
> {
> static aio_unlinkq_t *uq = NULL;
>
> if (path) {
> ...
> }
> while (uq != NULL) {
> ....
> }
> }

Note that the 'uq' variable is static...

What happens is that it makes sure that no more than 10 unlinks are
currently outstanding, and if this one would increase the number, it's
queued.

Then aioUnLink(NULL, NULL, NULL) starts queued unlinks if there are
any queued, and if the total number currently running is less than
10.
 
>
> Should I just delete this call, or is there something important missing?

No, don't delete the call. :)

Michael.
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