direct IPC VS Short IPC

Adam Lackorzynski adam at
Sun Mar 30 14:47:44 CEST 2008


On Mon Mar 24, 2008 at 02:16:32 -0700, hazwan wrote:
> I have problems in understanding short ipc and direct long IPC. Just want to
> know that is it implementing register short IPC with direct long IPC
> implementation is the same. Unlike indirect long IPC, we must use the
> message header (strdope, send dope and size dope) . Do i must also use the
> message structure for implementing direct long ipc or i just use the same
> implementation on short register message (L4_IPC_SHORT_MSG)? Im kinda
> confuse and unsure of this issue due to unproper theory understanding. Like
> indirect IPC, i can understand that the memory that saves the message is
> only being reffered by both threads that wish to communicate by referring
> the memory address of the message. Unlike direct long IPC message, what I do
> understand is that each thread has a copy of the message at the threads
> respective user space. However, I dont know how to copy the message from one
> thread user space to the other threads user space using IPC call. But if the
> implementation of the direct long IPC is as the same as the register
> message(L4_IPC_SHORT_MSG), then i think I can imagine the flow. Thank you
> and your help is highly appreciated.

Just look at the l4_msg_t structure at
That's the layout of the message buffer you need to use when doing
Long-IPC. 'word' is the place where the data comes (up to superpage
receiving: msg.size = L4_IPC_DOPE(buffer_size_in_machine_words, 0)
sending:   msg.send = L4_IPC_DOPE(machine_words_of_data_to_send, 0)
So now when supplying &msg as second parameter (for sending) to IPC the
kernel will copy as much data as specified starting from 'word'. The
receiver should at minimum supply as much space to be able to retrieve
the message. Otherwise the IPC will fail. The first two words must be
supplied in the two data parameters because they will not be copied by
the kernel.

Adam                 adam at

More information about the l4-hackers mailing list