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,
Hi,
the open_component and close_component function do get as first parameter the sender of the invocation (see Chapter 2.3 in the Dice manual http://www.inf.tu-dresden.de/content/institutes/sya/os/forschung/projekte/di...).
To get the thread ID of the server to which you want to send the open_call or close_call, you need some name service. See http://www.inf.tu-dresden.de/index.php?node_id=1314&ln=en and http://www.inf.tu-dresden.de/index.php?node_id=1315&ln=en.
Cheers, Ron.
fang zhengshu wrote:
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.de mailto:l4-hackers-request@os.inf.tu-dresden.de> wrote:
Send l4-hackers mailing list submissions to l4-hackers@os.inf.tu-dresden.de <mailto: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 <mailto: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 <mailto: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: 1. 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 <mailto:fangzhsh07@gmail.com>> To: l4-hackers@os.inf.tu-dresden.de <mailto: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 <mailto:a73d246f0908292357w7ddaed5cwdb2a3013b07020c5@mail.gmail.com>> Content-Type: text/plain; charset="iso-8859-1" hi all, 3. 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 <mailto:doebel@os.inf.tu-dresden.de>> > To: L4 Hackers <l4-hackers@os.inf.tu-dresden.de <mailto: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 <mailto: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,
l4-hackers@os.inf.tu-dresden.de