L4_IPC_DOPE() understanding

Björn Döbel doebel at os.inf.tu-dresden.de
Mon Mar 17 14:03:41 CET 2008


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi,

> Currently im studying IPC for L4/fiasco. I opened the exercise solution from
> dresden and try to study the coding and its flow. So far, i manage to
> understand but there is one part that im not certain which is the
> L4_IPC_DOPE(). As stated in the exercise solution, the L4_IPC_DOPE is
> initiated as L4_IPC_DOPE(0,1) which is assigned to the l4_msgdope_t
> structure:-
> 
> typedef struct
> {
>     l4_msgdope_t size_dope;
> }message_t; <---there are other variables initialize in this structure but i
> just shorten it to the issue.
> 
> message_t m;
> 
> m->size_dope = L4_IPC_DOPE(0,1);
> 
> I would like to know, what does this call (L4_IPC_DOPE) do and which file
> does this function is located. Is it in types.h? Hope anyone can assist me
> since im new in this field. Thanks.

L4_IPC_DOPE is a macro that is used to fill the msg dope for an IPC
message. The msg dope itself is there to describe how many dwords and
strings the message contains.

The macro's definition can be found in
l4/pkg/l4sys/include/L4API-l4v2/ipc.h. The parameters are

* the number of DWORDS in your message (in the example 0)
* the number of indirect strings in your message (in the example 1)

which means that in the example the message descriptor contains no
dwords and one string descriptor (pointer & size) as IPC payload.

Regards,
Bjoern
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFH3mwsP5ijxgQLUNkRAlOkAJ99+AjpWWZ7p/15X/IZWrISgdo+zACeO8+y
FDgYhKJpkr+i72G3kyD1eKY=
=iE3i
-----END PGP SIGNATURE-----




More information about the l4-hackers mailing list