Re: Can't get sender from l4_ipc_wait()

Adam Lackorzynski <[email protected]>
Newsgroups gmane.comp.micro-kernel.l4.devel
Message-ID <[email protected]>
Hi,

On Sun Apr 15, 2012 at 23:40:59 -0500, Haohui Mai wrote:
> Thanks for you suggestions. I did get sources from l4_ipc_wait() --
> but I still cant map it back to the thread originating the IPC.
> 
> I created an IPC gate for each task to receive page faults and
> exceptions, where I set the label of the gate to be my task
> identifier.
> 
> I did get my task identifier back, but it seems there's no way to get
> my thread identifier since the source code of L4 Fiasco suggests that
> l4_ipc_wait() will only return the label of the IPC gate as the
> source.

Yes, that's this way.

> Setting the same pager for all threads in a single task seems a
> reasonable thing to do but obviously it lost the information for
> thread identifier.
> 
> In order to recover this information, does it mean that I should
> create an IPC gate for each thread, setting its label to thread
> identifier in order to recover this information?

If you want to know which thread it is exactly, yes, you would need to
create a gate for each thread, otherwise there is no id anyway for the
thread in the pager's task.
 
> Taking a step back, am I doing the right thing? If the answer is no,
> what would be the suggested architecture?

Interesting to know would be why you need to know the thread exactly?
For mapping at least, only the task itself is relevant.



Adam
-- 
Adam                 [email protected]
  Lackorzynski         http://os.inf.tu-dresden.de/~adam/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.