IRQ request from server to client and server.loop()
adam at os.inf.tu-dresden.de
Thu Dec 19 23:55:58 CET 2013
On Thu Dec 19, 2013 at 02:03:33 +0100, cem akpolat wrote:
> On 19 Dec 2013, at 01:04, cem akpolat <akpolatcem at gmail.com> wrote:
> > On 19 Dec 2013, at 00:36, Adam Lackorzynski <adam at os.inf.tu-dresden.de> wrote:
> >> On Wed Dec 18, 2013 at 12:08:39 +0100, cem akpolat wrote:
> >>> I am quite new to the microkernel concept and I am trying to somehow
> >>> build an IRQ mechanism between client and server. There are two
> >>> questions that I want to ask:
> >>> 1- Is it possible to receive an IRQ message being sent by Server on
> >>> the client and handle it? I tried to apply that on the shared_ds
> >>> examples. However what I see is the IRQ registration could be done
> >>> only on the server side. How can a client, in a shared memory
> >>> case,receive an IRQ request from server and how can a server send an
> >>> IRQ request (in other words trigger an IRQ) to the client.
> >> For something such as shared memory, typically two IRQs are used, one
> >> for each direction. So both sides can trigger the other and also receive
> >> notifications.
> I have forgotten to mention on your explanation, you mean actually
> that I should also use a server_object on the client side for
> receiving IRQ.
> > This is actually the point that I have attempted to figure out until
> > now. We see an example for server side for the registration of IRQ
> > object. However there is no such a thing on the client side. If
> > there is, I couldn’t find it which means that I have to keep reading
> > the code. The simple question is actually how we can listen IRQ
> > request on the cline side, especially in which source code should I
> > search the response?
Shared memory is typically between partners of the same type, so both
typically have, abstractly, some event reception facility. Contrary for
a typical client+server setup, the server does not request anything from
Now you could use a predefined server-loop for implementing the shared
memory but you might also want to look at the shmc library
(+ examples/libs/shmc) which wraps shared memory handling for easier
use. Other location to look at could be the l4shmnet driver in L4Linux
that implements network via shared memory.
> >>> 2- How can we remove or disable the server.loop mechanism? What is the
> >>> role of this function?
> >> This function implements the receiving part of a server and dispatches
> >> incoming messages into the server functions that you're probably seen in
> >> the examples. If you do not want to use that server-loop functionality,
> >> for example, because it does not fit your needs, you just do something
> >> different replacing the server.loop() call. Is that your intention?
> > I have seen the loop code and its working mechanism as well as have
> > noticed how to manipulate it. Honestly, the code is in a
> > considerable manner huge and it is quite easy to muddle the whole
> > thing. Probably, I would change this server loop according to my
> > conditions.
It's built with some hooks that can be used to adapt it to specific
requirements if wanted.
Adam adam at os.inf.tu-dresden.de
More information about the l4-hackers