Re: dynamic reconfiguration

Matthias Lange <[email protected]>
Newsgroups gmane.comp.micro-kernel.l4.devel
Message-ID <[email protected]>
Hi,

On 08/15/2016 12:47 PM, ba_f wrote:
> Am 2016-08-11 09:07, schrieb Matthias Lange:
>>> If I got it right, any Task can create an IPC-Gate at run-time and
>>> thus create child tasks with ipc-server or ipc-client capabilities,
>>> don't they?
>>
>> That depends on the task's factory but the general answer is yes.
>>
>> Matthias.
> 
> 
> Hello,
> 
> 
> do you have a reference design for this?
> So maybe one 'parent' Task creating two 'childs' and establishes an IPC
> between them.

I am afraid that there is no such reference example. I would recommend
looking into ned's implementation (look for __alloc(lua_State *l) in
lua_factory.cc and exec(lua_State *l) in lua_exec.cc as starting points).

Basically, here is what you have to do (I leave the loading and setup of
the child program out):

- create new task
- create new thread
- create new IPC gate (needs to be done only once)
- map thread capability into new task
- map initial caps and IPC gate cap into new task
- setup pager and exception handler of the new task
- start the new thread

For some inspiration you can look at
libloader/include/remote_app_model::start_prog(). For ELF loading and
setup of the l4re kernel you should also consider using libloader's
infrastructure.

Matthias.

> 
> 
> 
> Have a nice day,
> 
> ba_f
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.