Gilles Chanteperdrix wrote:
> Jan Kiszka wrote:
>> Gilles Chanteperdrix wrote:
>>> Jan Kiszka wrote:
>>>> Hi Gilles,
>>>> this one requires some fixing too:
>>>> xeno_sem_heap is marked weak. xeno_init_sem_heaps is called once per
>>>> initialized skin. It unmaps any existing heap and creates a new one.
>>>> That's already fragile during constructor run, but it's lethal during
>>>> process runtime, ie. when using dlopen.
>>>> I think the solution is to handle forks separately and only remap in
>>>> that case. Digging in this direction now.
>>>> BTW, what triggers the re-run of xeno_init_sem_heaps after a fork so far?
>>> It must be done for the child process to get a private heap different
>>> from the parent process. I would guess it is handled by pthread_atfork.
>> Ah, only the POSIX skin does that. However, sem-heaps must not be
>> POSIX-only. OK, patch in the make.
> Actually, xeno_skin_bind_opt should call pthread_atfork, since the child
> process should be bound again, whatever the skin.
That's a another thing, but it's true. First of all I just pushed a fix
for the sem_heap issue that makes our test case happy.
Siemens AG, Corporate Technology, CT T DE IT 1
Corporate Competence Center Embedded Linux
Xenomai-core mailing list