All of lore.kernel.org
 help / color / mirror / Atom feed
* [Xenomai-help] --posix-ldflags and rt_task_shadow() of main
@ 2009-04-30 10:10 Frederik Bayart
  2009-04-30 12:12 ` Gilles Chanteperdrix
  0 siblings, 1 reply; 2+ messages in thread
From: Frederik Bayart @ 2009-04-30 10:10 UTC (permalink / raw)
  To: xenomai

Hallo,

I have a following question :

I have an executable linked linked with
xeno-config --posix-ldflags

so depends on :
libpthread_rt.so.1

If I want to turn my main function into a realtime task with
rt_task_shadow like code sample below, EBUSY is returned and I get the
message :

rt_task_shadow() failed: Device or resource busy.

This would mean that my main task is already a realtime task and I don't
have to call rt_task_shadow anymore. Is this correct ? It seems very
strange to me and I didn't find any documentation which confirms that if
you link with posix-flags your main thread is automatically realtime.

I don't get this message if I link with the xeno-config --xeno-ldflags,
but the reason that I want to link with the posix flags is that I also
use the shm_open function in my binary.

Below a code sample.

Frederik


int main()
{

mlockall(MCL_CURRENT | MCL_FUTURE);

if ((err = rt_task_shadow(&this_task, "Model:" QUOTE(MODEL), 1, T_FPU))
!= 0)
        printf("rt_task_shadow() failed: %s.\n", strerror(-err));

}



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-04-30 12:12 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-04-30 10:10 [Xenomai-help] --posix-ldflags and rt_task_shadow() of main Frederik Bayart
2009-04-30 12:12 ` 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.