hi all,
could someone tell me how to get the thread id when do the open_call()/close_call()? or we can get the thread id unless wo do the l4_ipc_send() operation?
I only want to get the thread id who do the open_call()/close_call() operation? When more than one task do the operation The server can store the thread id.
thank you and best wishes.
On Sun, Aug 30, 2009 at 6:00 PM, l4-hackers-request@os.inf.tu-dresden.dewrote:
Send l4-hackers mailing list submissions to l4-hackers@os.inf.tu-dresden.de
To subscribe or unsubscribe via the World Wide Web, visit http://os.inf.tu-dresden.de/mailman/listinfo/l4-hackers or, via email, send a message with subject or body 'help' to l4-hackers-request@os.inf.tu-dresden.de
You can reach the person managing the list at l4-hackers-owner@os.inf.tu-dresden.de
When replying, please edit your Subject line so it is more specific than "Re: Contents of l4-hackers digest..."
Today's Topics:
- Re: can server side get the thread id of client side? (fang zhengshu)
Message: 1 Date: Sun, 30 Aug 2009 02:57:16 -0400 From: fang zhengshu fangzhsh07@gmail.com To: l4-hackers@os.inf.tu-dresden.de Subject: Re: can server side get the thread id of client side? Message-ID: a73d246f0908292357w7ddaed5cwdb2a3013b07020c5@mail.gmail.com Content-Type: text/plain; charset="iso-8859-1"
hi all,
- Re: can server side get the thread id of client side?
(Bj?rn D?bel)
Message: 3 Date: Fri, 28 Aug 2009 09:40:17 +0200 From: Bj?rn D?bel doebel@os.inf.tu-dresden.de To: L4 Hackers l4-hackers@os.inf.tu-dresden.de Subject: Re: can server side get the thread id of client side? Message-ID: 4A9789E1.7080503@os.inf.tu-dresden.de Content-Type: text/plain; charset=ISO-8859-1
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Hi,
I know that the client side can get the server's thread_id throw name service. I want to ask can the server side get the client's task_id or thread_id? or must the client side send the thread_id to server?
your server will call either l4_ipc_wait() or l4_ipc_reply_and_wait() in order to receive the message from the client. In both cases there is a src parameter which will contain the client's thread ID after the system call returns.
sorry for not explaining it clearly. if I defined two functions in idl file, just like: interface test{ int open(int fd, int flags); int close(fd); };
and I implement them in the server side. 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.
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?
thank you!
-- fang,