Module: xenomai-forge
Branch: next
Commit: a26ec68ca3a0e980fcedd7a4a65fe4cd4ed697d0

Author: Philippe Gerum <>
Date:   Sat Dec 14 12:17:23 2013 +0100

cobalt/thread: demote thread upon cancellation request

A thread which is sent a cancellation request might be held internally
by the scheduling policy it undergoes, in a way that would prevent it
from waking up for exiting. Typically, a SCHED_QUOTA thread with no
runtime budget at the time of the request would be prevented from

To address this issue, we demote threads receiving a cancellation
request, which implies switching them out of primary mode, and moving
to the weak scheduling class, where it cannot be held.


 kernel/cobalt/thread.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/cobalt/thread.c b/kernel/cobalt/thread.c
index 00d6c41..af86783 100644
--- a/kernel/cobalt/thread.c
+++ b/kernel/cobalt/thread.c
@@ -1535,7 +1535,7 @@ check_self_cancel:
-       __xnshadow_kick(thread);
+       __xnshadow_demote(thread);

Xenomai-git mailing list

Reply via email to