hi all,<br><br><div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
3. Re: can server side get the thread id of client side?<br>
(Bj?rn D?bel)<br>
Message: 3<br>
Date: Fri, 28 Aug 2009 09:40:17 +0200<br>
From: Bj?rn D?bel <<a href="mailto:doebel@os.inf.tu-dresden.de" target="_blank">doebel@os.inf.tu-dresden.de</a>><br>
To: L4 Hackers <<a href="mailto:l4-hackers@os.inf.tu-dresden.de" target="_blank">l4-hackers@os.inf.tu-dresden.de</a>><br>
Subject: Re: can server side get the thread id of client side?<br>
Message-ID: <<a href="mailto:4A9789E1.7080503@os.inf.tu-dresden.de" target="_blank">4A9789E1.7080503@os.inf.tu-dresden.de</a>><br>
Content-Type: text/plain; charset=ISO-8859-1<br>
<br>
-----BEGIN PGP SIGNED MESSAGE-----<br>
Hash: SHA1<br>
<br>
Hi,<br>
<br>
> I know that the client side can get the server's thread_id throw name<br>
> service. I want to ask can the server side get the client's task_id or<br>
> thread_id?<br>
> or must the client side send the thread_id to server?<br>
<br>
your server will call either l4_ipc_wait() or l4_ipc_reply_and_wait() in<br>
order to receive the message from the client. In both cases there is a<br>
src parameter which will contain the client's thread ID after the system<br>
call returns.<br>
</blockquote><div>sorry for not explaining it clearly.<br>if I defined two functions in idl file, just like:<br>
interface test{<br>
<div style="margin-left: 40px;">int open(int fd, int flags);<br>
int close(fd);<br>
};<br>
<br>
</div>
and I implement them in the server side.<br>I know that when I use open()/close() in the client side, the server will call the function open_component()/close_component() which are in the server side.<br><br>In the open_component()/close_component() function I want to get thread id of the caller to do some operation flag.but as we know, when we call open()/close() in client side, the
open_component()/close_component() function in server side will be executed. so we can
not use l4_ipc_wait() or l4_ipc_reply_and_wait() function in the
open_component()/close_component() function, or it will be stop and wait for a message in
the function. So in order to get the thread id in the open_component()/close_component(), when or where should I use the l4_ipc_wait() or l4_ipc_reply and wait() to get the thread id?<br><br>thank you!<br><br><br></div>
</div><br><br clear="all"><br>-- <br>fang,<br>