From: Philippe Gerum <rpm@xenomai.org>
To: Frederik Bayart <frederik_bayart@yahoo.co.uk>,
"xenomai@xenomai.org" <xenomai@xenomai.org>
Subject: Re: [Xenomai] xenomai-3.0-rc5 : binding named semaphores from external process
Date: Tue, 14 Jul 2015 11:53:51 +0200 [thread overview]
Message-ID: <55A4DC2F.1090608@xenomai.org> (raw)
In-Reply-To: <1835626271.1735438.1436794640939.JavaMail.yahoo@mail.yahoo.com>
On 07/13/2015 03:37 PM, Frederik Bayart wrote:
> Hallo,
>
> I have problems to bind named semaphores from an external process using
> the alchemy API. Below a detailed description. Does anyone have a suggestion
>
> what could be wrong or what I could do to solve the problem ?
> Kind regards,
>
> Frederik
>
> In attachment an example to reproduce my problem (makefile, stest.c).
> If you run 'sudo ./stest 1', a named semaphore is created and a task is started
> that binds it and perform a p operation. The main task is waiting on CTRL+C,
> and then ask the numer of waiters and performs v operations.
> If you run 'sudo ./stest 0', the named semaphore is not created, only a task is
> started that binds it and perform a p operation.
>
> I start first 'sudo ./stest 1'. The process binds the semaphore and blocks on rt_sem_p.
> The content of /var/run/xenomai is :
>
[snip]
The key issue is that multiple programs forming a single application
must belong to the same Xenomai session, for sharing data/objects. The
notion of "session" was introduced by Xenomai 3.
So, all you need to do, is to tell the application bootstrap code about
the session you want to create between several programs, e.g.:
# ./stest --session=foo 1
# ./stest --session=foo 0
--
Philippe.
next prev parent reply other threads:[~2015-07-14 9:53 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-13 13:37 [Xenomai] xenomai-3.0-rc5 : binding named semaphores from external process Frederik Bayart
2015-07-14 9:53 ` Philippe Gerum [this message]
2015-07-15 12:45 ` Frederik Bayart
2015-07-16 15:35 ` Philippe Gerum
2015-07-28 15:19 ` Frederik Bayart
2015-07-29 10:12 ` Philippe Gerum
2015-07-29 11:48 ` Frederik Bayart
2015-07-29 12:20 ` Philippe Gerum
2015-07-29 12:28 ` Philippe Gerum
2015-07-29 12:48 ` Philippe Gerum
2015-07-29 12:56 ` Philippe Gerum
2015-07-29 15:14 ` Frederik Bayart
2015-07-29 18:27 ` Philippe Gerum
2015-07-29 18:42 ` Philippe Gerum
2015-07-30 14:28 ` Frederik Bayart
2015-07-30 15:08 ` Frederik Bayart
2015-07-30 16:10 ` Philippe Gerum
2015-07-31 17:54 ` Frederik Bayart
2015-08-01 7:59 ` Philippe Gerum
2015-08-01 8:43 ` Philippe Gerum
2015-08-03 9:59 ` Frederik Bayart
2015-07-30 15:58 ` Philippe Gerum
2015-07-30 16:36 ` Philippe Gerum
2015-07-31 16:04 ` Frederik Bayart
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=55A4DC2F.1090608@xenomai.org \
--to=rpm@xenomai.org \
--cc=frederik_bayart@yahoo.co.uk \
--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.