Hi all,
I have two tasks running and communicating through an IPC connection (basically the clntsrv demo). Now I would like to extend this a bit:
Using an ipc_call(), the client (actually: multiple clients) should be able to register with a server to receive a wakeup IPC at individually different points in time in the future.
(First, flawed idea to do this was to *not* use the combined reply_and_wait call on the server side but instead to only do a wait() call and then postpone the corresponding reply() until when the client should be woken up. However, I learned that this will not work because the implicit reply capability will be lost as soon as another ipc call is done by the server.)
Next idea now is to create another IPC channel in the client and to pass (via IPC) the send capability for that channel to the server. The client shall than block in an ipc_receive() on that channel and the server can wake it by sending to that channel. I guess this should be possible and for a seasoned Fiasco.OC/L4Re expert it is probably quite easy to do, but I can't seem to find how to:
- create an IPC channel at client/server run time (so far, all IPC channels I used were prepared by Ned through lua scripts) - pass the send capability for such a channel to another task via IPC
Can anyone point me to some helpful documentation or maybe an example I could cannibalize to implement this (preferably in C, but C++ code would surely be helpful too)?
Thanks in advance for any help!
Robert