From: Roman Pisl <rpisl@domain.hid>
To: Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org>
Cc: xenomai@xenomai.org
Subject: Re: [Xenomai-help] Problem with mutexes in daemon
Date: Wed, 22 Apr 2009 12:34:32 +0200 [thread overview]
Message-ID: <49EEF2B8.2090702@domain.hid> (raw)
In-Reply-To: <49EEE9F1.2000204@domain.hid>
Gilles Chanteperdrix napsal(a):
> Roman Pisl wrote:
>> Hello,
>> I'm experiencing weird behavior with mutexes in a daemon application.
>> After daemon() is called, unnamed mutexes fail on call
>> rt_mutex_release() with -EPERM. Everything is ok for named mutexes.
>>
>> Is there something special with daemon and unnamed mutexes - should all
>> have name? Or is it a bug? I'm using kernel 2.6.28 and Xenomai 2.4.6.1.
>>
>> Example showing this problem is attached.
>
> Unnamed mutexes are local to a process. Since forking results in a
> different process, mutexes are not preserved.
>
> Yes, Xenomai behaviour is not intuitive, but fixing this requires
> internal changes.
>
I understand, but daemon() is the first call and everything is done in
the new forked process.
What is the best solution for now? Is everything except unnamed mutexes
supposed to work well in daemon or should I cancel the concept of daemon
at all?
Roman
next prev parent reply other threads:[~2009-04-22 10:34 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-04-22 9:41 [Xenomai-help] Problem with mutexes in daemon Roman Pisl
2009-04-22 9:57 ` Gilles Chanteperdrix
2009-04-22 10:34 ` Roman Pisl [this message]
2009-04-22 11:57 ` Gilles Chanteperdrix
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=49EEF2B8.2090702@domain.hid \
--to=rpisl@domain.hid \
--cc=gilles.chanteperdrix@xenomai.org \
--cc=xenomai@xenomai.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.