All of lore.kernel.org
 help / color / mirror / Atom feed
* [Xenomai-core] Using SIGWINCH to trigger priority change.
@ 2008-10-12 15:02 Gilles Chanteperdrix
  2008-10-12 15:36 ` Jan Kiszka
  2008-10-13 12:54 ` Philippe Gerum
  0 siblings, 2 replies; 5+ messages in thread
From: Gilles Chanteperdrix @ 2008-10-12 15:02 UTC (permalink / raw)
  To: xenomai-core


Hi,

I am working on using SIGWINCH to trigger priority changes in
user-space. And I am afraid it will never really work:
- Xenomai makes a difference between the base priority of a thread and
its current priority. But pthread_getschedparam should return the base
priority, not the current priority, so, we need a way to change the
current priority of a thread without changing its base priority.
- I do not know at what time we should trigger a signal to the thread
whose priority is changing:
  . if we send it as soon as we return to user-space (at the same time
as when we handle LO_RENICE_REQ), if the thread whose priority is
changing is not the current one, we potentially trigger a
primary/secondary mode transition for this thread;
  . if we wait for the target thread to return to secondary mode (via
xnshadow_relax), any other thread in the same process which would read
the target thread priority with pthread_getschedparam would not see that
the priority has changed;
  . we could do it as soon as a thread of the same process returns to
secondary mode, but it looks complicated, and besides,
pthread_getschedparam can safely be called from primary mode, so we
still have the same issue as for the previous point.

This is where I stopped thinking about this idea.
Thanks in advance for any help.

-- 
					    Gilles.


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

end of thread, other threads:[~2008-10-13 13:44 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-10-12 15:02 [Xenomai-core] Using SIGWINCH to trigger priority change Gilles Chanteperdrix
2008-10-12 15:36 ` Jan Kiszka
2008-10-13 12:54 ` Philippe Gerum
2008-10-13 13:00   ` Gilles Chanteperdrix
2008-10-13 13:44     ` Philippe Gerum

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.