Istream beginner help

Adam Lackorzynski adam at os.inf.tu-dresden.de
Tue Jun 17 23:34:10 CEST 2014


On Thu Jun 12, 2014 at 21:56:05 +0200, ba_f wrote:
> for design reason i would like to use separate Istream & Ostream instead of
> IOstream with call().
> 
> ostream.send() does work, but i cant manage istream.receive(). It keeps
> waiting for ever.
> 
> I did edit the client from pkg/examples/clntsrv, the server sends the
> result, so there should be something to receive.
> What am i missing?

The problem is twofold. First, the server replies immediately with a
zero timeout, thus it is likely that the client is not yet receiving and
the reply is lost. Further, the server does not know the client, thus it
can only reply to the preceding receive. For that reason the client
needs to do a 'call' which atomically transfers the client from sending
to receiving and the send from the server can be transferred to the
client.



Adam
-- 
Adam                 adam at os.inf.tu-dresden.de
  Lackorzynski         http://os.inf.tu-dresden.de/~adam/



More information about the l4-hackers mailing list