Skip to contentSkip to conversation

rt descriptors

Xenomai-help Victor Shulyak 3 participants 3 messages Feb 2, 2007 – Feb 4, 2007

lore
Share & tools
lore
#0 lore raw

Hello

Can I use RT_HEAP (or others descriptors) in the following way:

RT_HEAP h_desc;
create descriptor (rt_heap_create (&h_desc,...)

fork
child process: rt_task_shadow () and rt_heap_alloc (&h_desc, ...) parent process: rt_heap_alloc (&h_desc, ...)

Will h_desc be valid and usable in child processes?

Thanks, Victor

#1 lore raw
Quoted 4 lines · Victor Shulyak

Hello

Can I use RT_HEAP (or others descriptors) in the following way:

Quoted 8 lines

RT_HEAP h_desc;
create descriptor (rt_heap_create (&h_desc,...)

fork
child process: rt_task_shadow () and rt_heap_alloc (&h_desc, ...) parent process: rt_heap_alloc (&h_desc, ...)

Will h_desc be valid and usable in child processes?

forking in a xenomai process is not yet fully supported. You can do it, but you will get unwanted switches to secondary mode because of page faults. This issue is solved by the following patch:

https://mail.gna.org/public/xenomai-core/2007-01/msg00092.html

but the patch has not yet been merged with the I-pipe patch, so, if you want to call fork in your xenomai programs, you have to apply this patch after the I-pipe patch.

Now, about the rt descriptors, I would expect them to be usable in child processes as well.

Signature · 1 line
					    Gilles Chanteperdrix.
#2 lore raw
Quoted 18 lines · Gilles Chanteperdrix
Quoted 4 lines · Victor Shulyak

Hello

Can I use RT_HEAP (or others descriptors) in the following way:

Quoted 8 lines

RT_HEAP h_desc;
create descriptor (rt_heap_create (&h_desc,...)

fork
child process: rt_task_shadow () and rt_heap_alloc (&h_desc, ...) parent process: rt_heap_alloc (&h_desc, ...)

Will h_desc be valid and usable in child processes?

forking in a xenomai process is not yet fully supported. You can do it, but you will get unwanted switches to secondary mode because of page faults. This issue is solved by the following patch:

Quoted 6 lines

https://mail.gna.org/public/xenomai-core/2007-01/msg00092.html

but the patch has not yet been merged with the I-pipe patch, so, if you want to call fork in your xenomai programs, you have to apply this patch after the I-pipe patch.

Btw, for x86, it's been merged in 1.7-00:
http://download.gna.org/adeos/patches/v2.6/i386/adeos-ipipe-2.6.19-i386-1.7-00.patch

Quoted 3 lines

Now, about the rt descriptors, I would expect them to be usable in child processes as well.

Signature · 1 line
Philippe.