* [Xenomai-help] Creating shared objects for realtime and non-realtime
@ 2008-09-19 19:00 Rob Wheeler
2008-09-19 19:10 ` Gilles Chanteperdrix
0 siblings, 1 reply; 3+ messages in thread
From: Rob Wheeler @ 2008-09-19 19:00 UTC (permalink / raw)
To: xenomai
I'm working on a large system that consists of several shared objects
that get linked together into an executable. In one instance, I link
these shared objects together with a realtime control loop to create
an executable that runs on my target hardware platform. In another
instance, I want to link these shared objects into an executable that
runs under simulation on a non-realtime platform. I'm using posix
APIs throughout the shared objects for threading and mutex operations.
I'd like to create a single instance of each of these shared objects
and do the Xenomai "skin wrapping" at the final link step, but it
seems that instead I need to create a realtime and non-realtime
version of each shared object and link against the correct ones during
the final link step. Has someone else faced this issue before?
-R
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Xenomai-help] Creating shared objects for realtime and non-realtime
2008-09-19 19:00 [Xenomai-help] Creating shared objects for realtime and non-realtime Rob Wheeler
@ 2008-09-19 19:10 ` Gilles Chanteperdrix
2008-09-20 21:03 ` Gilles Chanteperdrix
0 siblings, 1 reply; 3+ messages in thread
From: Gilles Chanteperdrix @ 2008-09-19 19:10 UTC (permalink / raw)
To: Rob Wheeler; +Cc: xenomai
Rob Wheeler wrote:
> I'm working on a large system that consists of several shared objects
> that get linked together into an executable. In one instance, I link
> these shared objects together with a realtime control loop to create
> an executable that runs on my target hardware platform. In another
> instance, I want to link these shared objects into an executable that
> runs under simulation on a non-realtime platform. I'm using posix
> APIs throughout the shared objects for threading and mutex operations.
> I'd like to create a single instance of each of these shared objects
> and do the Xenomai "skin wrapping" at the final link step, but it
> seems that instead I need to create a realtime and non-realtime
> version of each shared object and link against the correct ones during
> the final link step. Has someone else faced this issue before?
The first approach should work, what goes wrong when you try ?
--
Gilles.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Xenomai-help] Creating shared objects for realtime and non-realtime
2008-09-19 19:10 ` Gilles Chanteperdrix
@ 2008-09-20 21:03 ` Gilles Chanteperdrix
0 siblings, 0 replies; 3+ messages in thread
From: Gilles Chanteperdrix @ 2008-09-20 21:03 UTC (permalink / raw)
To: Rob Wheeler; +Cc: xenomai
Gilles Chanteperdrix wrote:
> Rob Wheeler wrote:
>> I'm working on a large system that consists of several shared objects
>> that get linked together into an executable. In one instance, I link
>> these shared objects together with a realtime control loop to create
>> an executable that runs on my target hardware platform. In another
>> instance, I want to link these shared objects into an executable that
>> runs under simulation on a non-realtime platform. I'm using posix
>> APIs throughout the shared objects for threading and mutex operations.
>> I'd like to create a single instance of each of these shared objects
>> and do the Xenomai "skin wrapping" at the final link step, but it
>> seems that instead I need to create a realtime and non-realtime
>> version of each shared object and link against the correct ones during
>> the final link step. Has someone else faced this issue before?
>
> The first approach should work, what goes wrong when you try ?
Looks like I misunderstood what you are doing. When creating a shared
object, a link-edit stage happens, and if you want the resulting shared
object to use xenomai posix skin services, you have to pass the --wrap
flags.
Now, I do not really understand what you are doing, when you say
"several shared objects get linked together into an executable". What is
the result, a single executable ? Or the executable and a set of shared
objects ? Because if the result is a single executable, you can use
static libraries (i.e. ar archives) instead of shared objects, and in
this case you are able to pass the --wrap flags only for the final
linking stage.
Otherwise, if you want something completely dynamic, you may resort to
dlopen and dlsym...
--
Gilles.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2008-09-20 21:03 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-09-19 19:00 [Xenomai-help] Creating shared objects for realtime and non-realtime Rob Wheeler
2008-09-19 19:10 ` Gilles Chanteperdrix
2008-09-20 21:03 ` Gilles Chanteperdrix
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.