From: Philippe Gerum <rpm@xenomai.org>
To: Anders Blomdell <anders.blomdell@control.lth.se>,
"Xenomai@xenomai.org" <Xenomai@xenomai.org>
Subject: Re: [Xenomai] Mixing linux and alchemy (cobalt) calls
Date: Fri, 06 Feb 2015 16:11:46 +0100 [thread overview]
Message-ID: <54D4D9B2.8090805@xenomai.org> (raw)
In-Reply-To: <54D4D409.2020708@control.lth.se>
On 02/06/2015 03:47 PM, Anders Blomdell wrote:
> I have an application that need both realtime and linux sockets, am I correct in assuming that
> withe the alchemy skin I could access them like
>
> socket(... // Linux version
> __real_socket(... // Linux version
> __cobalt_socket(... // Alchemy/cobalt version
>
> while under the cobalt skin, it would be:
>
> socket(... // Alchemy/cobalt version
> __real_socket(... // Linux version
> __cobalt_socket(... // Alchemy/cobalt version
>
This depends on the LDFLAGS retrieved from xeno-config:
1. with --posix mentioned in the xeno-config --ldflags request
socket(...), __cobalt_socket(...) or __RT(socket(...)) => Cobalt
implementation
__real_socket(...) or __STD(socket(...)) => glibc service
2. without --posix mentioned in the xeno-config --ldflags request
__cobalt_socket(...) or __RT(socket(...)) => Cobalt implementation
socket(...) or __STD(socket(...)) => glibc service
e.g.
- the application only wants to access the POSIX services implemented by
Cobalt using the regular POSIX names: LDFLAGS should contain the output of:
$ xeno-config --posix --ldflags, or --cobalt --ldflags.
- the application wants to access the POSIX services implemented by
Cobalt using the regular POSIX names, and the alchemy API: LDFLAGS
should contain the output of:
$ xeno-config --posix --alchemy --ldflags, or --cobalt --alchemy --ldflags.
- the application wants to access the POSIX services implemented by
Cobalt solely via the explicit POSIX wrappers, and the alchemy API:
LDFLAGS should contain the output of (i.e. omitting --posix):
$ xeno-config --alchemy --ldflags, or --alchemy --ldflags.
NOTE: using __RT() is preferred to calling __cobalt(), in case an API
stacked over the Cobalt POSIX API redefines its own implementation of
POSIX services over the dual kernel. __RT() would call the stacked
implementation, __cobalt() would force a call to the Cobalt
implementation of the service.
--
Philippe.
next prev parent reply other threads:[~2015-02-06 15:11 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-06 14:47 [Xenomai] Mixing linux and alchemy (cobalt) calls Anders Blomdell
2015-02-06 15:11 ` Philippe Gerum [this message]
2015-02-06 15:34 ` Anders Blomdell
2015-02-06 15:49 ` Philippe Gerum
2015-02-06 15:56 ` Anders Blomdell
2015-02-06 16:12 ` Gilles Chanteperdrix
2015-02-06 16:16 ` Gilles Chanteperdrix
2015-02-09 15:52 ` Anders Blomdell
2015-02-09 15:57 ` Gilles Chanteperdrix
2015-02-09 16:10 ` Anders Blomdell
2015-02-09 16:24 ` Gilles Chanteperdrix
2015-02-09 17:02 ` Anders Blomdell
2015-02-09 17:14 ` Philippe Gerum
2015-02-09 17:27 ` Philippe Gerum
2015-02-09 17:38 ` Anders Blomdell
2015-02-09 20:08 ` Philippe Gerum
2015-02-09 20:15 ` Anders Blomdell
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=54D4D9B2.8090805@xenomai.org \
--to=rpm@xenomai.org \
--cc=Xenomai@xenomai.org \
--cc=anders.blomdell@control.lth.se \
/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.