l4dm_mem_open call from L4Linux user process

Adam Lackorzynski adam at os.inf.tu-dresden.de
Thu Sep 29 09:47:24 CEST 2005


Hi,

On Wed Sep 28, 2005 at 11:58:11 -0400, Julian Grizzard wrote:
> I've been working with the dataspace calls with the L4Env running x86
> Fiasco.  I am trying to create a dataspace from a L4Linux user process,
> but I am having trouble getting the program to compile.  Is my Makefile
> correct for what I am trying to do?  Is there any reason I shouldn't be
> able to link to l4dm_mem_open from a L4Linux user process?  Below is my
> source, Makefile, and compiler error message.  Help much appreciated!
> 

Umm, basically it's possible to create a new DS in an L4Linux user app,
as it is created at your DS manager (so most likely dm_phys). This has
nothing to do with L4Linux or the user app in the first place.
Attaching to it is a different issue altogether!

> ---------- SOURCE ----------
> #include <l4/dm_mem/dm_mem.h>
> #include <l4/l4rm/l4rm.h>
> 
> #include <l4/sys/types.h>
> #include <l4/dm_generic/types.h>
> 
> int main(int argc, char**argv){
> 	l4dm_dataspace_t ds;
> 	void *addr;
> 
> 	l4dm_mem_open(L4DM_DEFAULT_DSM,8192,0,0,"L4RM example",&ds);
> 	printf("hi\n");
> 
>   return 0;
> }
> 
> ---------- MAKEFILE ----------
> PKGDIR		?= ../..
> L4DIR		?= $(PKGDIR)/../..
> 
> TARGET		= $(PKGNAME)
> 
> MODE		= host

Mode 'host' has no L4 specific libs, includes etc, try 'l4linux' which
gives you host + L4 stuff.

This should basically fix your linking problem because the libs you link
have dependencies to other libs which must be fulfilled.




Adam
-- 
Adam                 adam at os.inf.tu-dresden.de
  Lackorzynski         http://os.inf.tu-dresden.de/~adam/




More information about the l4-hackers mailing list