At Mon, 24 Apr 2006 01:32:06 +0200, Pierre THIERRY <[EMAIL PROTECTED]> wrote: > > [1 <multipart/signed (7bit)>] > [1.1 <text/plain; us-ascii (quoted-printable)>] > I'm having trouble understanding a point in the specification of the I/O > capability type: > > ``If [...] amount is 0, then [...] a void capability is returned in > retry.'' > > ``To implement a select -like functionality, amount can be set to 0. > This probes if data is immediately available for reading or not. If > this method is invoked on the I/O object, then the probe is > non-blocking. If it is invoked on the retry capability, the probe is > blocking.'' > > I'm not sure it there is'nt a contradiction here, or if I just don't > understand: when no invocation has been made, there is no retry > capability, so when you start this select-like behaviour, you have to > invoke the io_read on the io_t capability. But if amount is set to 0, > you get a void capability. Do you invoke the io_read method on the void > capability. Then, what happens?
Thanks for pointing this out. The draft specification of io_read and io_write could be much clearer, it's so complicated because there are so many combinations. The first statement above only applies to seekable objects (like files), which never block. For seekable objects, if amount is set to 0, the previous paragraph applies that says that a retry capability may be returned. If you _do_ get a retry capability, you would block. If you get a void capability, there is data available and you would not block. However, this is not clear from the description, so it definitely needs to be fixed. Thanks, Marcus _______________________________________________ L4-hurd mailing list [email protected] http://lists.gnu.org/mailman/listinfo/l4-hurd
