re: async io?

Richard Gooch (rgooch@atnf.csiro.au)
Thu, 6 May 1999 21:30:58 +1000


Dan Kegel writes:
> > Could someone in the list let me know
> > if linux supports aio_* functions similar to solaris ?
>
> The 2.2 kernel can generate aio-like realtime signals upon I/O
> completion (see http://www.kegel.com/c10k.html);
> you associate a signal to an fd using the F_SETSIG ioctl.
>
> (Those who know better, please correct any mistakes I make here.)
>
> However, you don't have the ability to specify one signal
> for one I/O operation, and a different signal for the next,
> I think. And that means you can't tell what the signal
> means, i.e. whether the socket is now ready for reading,
> or for writing. I hope I'm wrong about this.
>
> I suppose in practice, this isn't so bad;
> you try the likely operation, and if that fails immediately,
> try the less-likely one.

Nah, just run poll() on the fd you get. Then you know. For obvious
reasons, you wouldn't use select()...

Regards,

Richard....

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/