Am i missing something here ?

Michael Hohmuth hohmuth at innocent.com
Tue Apr 27 19:46:38 CEST 1999


kermit the frog <kermit at tower.com.ar> writes:

> First of all, thanks for replying. I happen to have another problem. If i
> try to create a new task, no matter what i do i always get the message
> 
> 'KDB: task new: not chief'
> 
> the line im using to create a task is as follows:
>   recv = l4_task_new(recv, 6, (dword_t) task+(4096*2), (dword_t)task,
> L4_NIL_ID);
> Where task is a function defined void task(void); Im asuming here that the
> stack will begin , lets say to pages from the code page (task + (4096*2)).
> 
> Am i missing something here ?? (-:

Yes: In order to be allowed to create or delete a task, you must be
the task's ``chief.''  When the system boots, Rmgr (task 4) is the
chief of all other tasks, and thus is the only task which may create
new tasks.  Your task (probably task 5) initially cannot create any
task.

The current owner of a chief right to nonexistent tasks can transfer
the right using the l4_task_new() system call.  There is an Rmgr
protocol message which allows tasks to request chief rights to
specific tasks from Rmgr.

I'll append below a library which wraps the Rmgr protocol into C
bindings.  With it it you can request a new chief right using the
sequence:

  rmgr_init();
  error = rmgr_get_task(number);

(The library also contains functions called rmgr_task_new() and
rmgr_task_new_with_prio() which lets Rmgr create a new task, but these
currently don't work with Fiasco because they require long-message
IPC.  Long-message IPC has only been implemented recently, and I'm
currently testing it; it will be included in the next release.)

Michael
-- 
hohmuth at innocent.com, hohmuth at inf.tu-dresden.de
http://home.pages.de/~hohmuth/

-------------- next part --------------
A non-text attachment was scrubbed...
Name: librmgr.c
Type: application/octet-stream
Size: 6557 bytes
Desc: not available
URL: <http://os.inf.tu-dresden.de/pipermail/l4-hackers/attachments/19990427/5532dd90/attachment-0002.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: librmgr.h
Type: application/octet-stream
Size: 885 bytes
Desc: not available
URL: <http://os.inf.tu-dresden.de/pipermail/l4-hackers/attachments/19990427/5532dd90/attachment-0003.obj>


More information about the l4-hackers mailing list