l4-hurd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Nurd-NG io_t


From: Marcus Brinkmann
Subject: Re: Nurd-NG io_t
Date: Mon, 24 Apr 2006 02:06:35 +0200
User-agent: Wanderlust/2.14.0 (Africa) SEMI/1.14.6 (Maruoka) FLIM/1.14.7 (Sanjō) APEL/10.6 Emacs/21.4 (i486-pc-linux-gnu) MULE/5.0 (SAKAKI)

At Mon, 24 Apr 2006 01:32:06 +0200,
Pierre THIERRY <address@hidden> 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





reply via email to

[Prev in Thread] Current Thread [Next in Thread]