Linking a L4 library with a L4Linux app?

Frank Mehnert fm3 at
Thu Feb 24 16:32:21 CET 2005

On Thursday 24 February 2005 15:26, Leon Brits wrote:
> Thanks - It works!!!


> > But be aware that, as
> > Adam said, the Linux server is not aware of memory from external data-
> > spaces. So read/write syscalls don't work with this memory. To use these
> So as long as only my Linux app/kernel module accesses the data all is
> fine but to make it available to another Linux app I need to copy it to
> Linux allocated memory. Is this correct?

No. As long as your Linux application accesses the data, all is fine.

> > you had to use double buffering.
> What is double buffering? [The last time I heard this term was with
> graphics device drivers]

Do NOT try to this:

- create a dataspace
- attach it with l4rm_attach from emul_l4rm.c, you get address ADDR
- read(..., ADDR, ...)

because the Linux kernel is located in a separate address space and
it does not _see_ that memory. If you try this you will only get

Double buffering is this:

  static char buf[...];
  int len;

  len = read(..., buf, ...);
  /* make sure that len <= sizeof(buf)
  memcpy(ADDR, buf, len);

## Dept. of Computer Science, Dresden University of Technology, Germany ##
##                                     ##
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <>

More information about the l4-hackers mailing list