All of lore.kernel.org
 help / color / mirror / Atom feed
* [Xenomai-help] detect mode switches to primary mode
@ 2010-11-06  2:26 Peter Pastor
  2010-11-06 13:51 ` Gilles Chanteperdrix
  0 siblings, 1 reply; 8+ messages in thread
From: Peter Pastor @ 2010-11-06  2:26 UTC (permalink / raw)
  To: xenomai

[-- Attachment #1: Type: text/plain, Size: 844 bytes --]

Dear all,

I am running several boarder line threads that are running in primary mode
only when accessing some shared memory, otherwise I want them to run in
secondary mode. I have used rt_task_set_mode to warn me upon switches to
secondary modes, however, my question is, is there a similar way to detect
mode switches to primary mode ?

I have figured out a workaround using pthread_set_mode_np to force the
thread to run in secondary mode (after shared memory access) and right
before I force it back to primary mode do a printf and see whether I get a
warning of switching into secondary mode (if so, then I know that the thread
was running in primary mode, if not, then the thread was running in
secondary mode.)

Again, my question is, is there an elegant way to detect mode switches from
secondary mode to primary mode ?

THANKS,
 peter

[-- Attachment #2: Type: text/html, Size: 880 bytes --]

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

end of thread, other threads:[~2010-11-06 19:48 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-11-06  2:26 [Xenomai-help] detect mode switches to primary mode Peter Pastor
2010-11-06 13:51 ` Gilles Chanteperdrix
     [not found]   ` <AANLkTimhUUYDkHh6wJ_zL8dLJgCi+7F8kOXrA63LzTO9@domain.hid>
2010-11-06 15:34     ` Gilles Chanteperdrix
2010-11-06 16:08     ` Gilles Chanteperdrix
2010-11-06 17:03   ` Peter Pastor
2010-11-06 18:20     ` Gilles Chanteperdrix
2010-11-06 19:43       ` Peter Pastor
2010-11-06 19:48         ` 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.