kernel/cobalt/thread: Confine condition for sending SIGSHADOW on xnthread_suspend
PATCH 2/2 kernel/cobalt/thread: Confine condition for sending SIGSHADOW on xnthread_suspend
From: Jan Kiszka <[email protected]>
In fact, XNDELAY is only self-applied. Drop it from the condition set and also fix the comment explaining this as well as some other bits.
Signed-off-by Jan Kiszka <[email protected]>
--- kernel/cobalt/thread.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)
kernel/cobalt/thread.c +5 -5
@@ -996,7 +996,7 @@ void xnthread_suspend(struct xnthread *thread, int mask,* assumptions regarding suspended threads. * * We only care for threads that are not current, and for -* XNSUSP, XNDELAY, XNDORMANT and XNHELD conditions, because: +* XNSUSP and XNHELD conditions, because: * * - There is no point in dealing with a relaxed thread which * is current, since personalities have to ask for primary
@@ -1005,15 +1005,15 @@ void xnthread_suspend(struct xnthread *thread, int mask,* * - among all blocking bits (XNTHREAD_BLOCK_BITS), only * XNSUSP, XNDELAY, XNHELD and XNDBGSTOP may be applied by the -* current thread to a non-current thread. XNPEND is always -* added by the caller to its own state, XNMIGRATE, XNRELAX -* and XNDBGSTOP have special semantics escaping this issue. +* current thread to a non-current thread. XNPEND, XNDELAY and +* XNDORMANT are always added by the caller to its own state, +* XNMIGRATE, XNRELAX and XNDBGSTOP have special semantics escaping this issue. * * We don't signal threads which are already in a dormant * state, since they are suspended by definition. */ if (((oldstate & (XNTHREAD_BLOCK_BITS |XNUSER )) == (XNRELAX |XNUSER )) && - (mask & (XNDELAY |XNSUSP |XNHELD )) !=0 ) { + (mask & (XNSUSP |XNHELD )) !=0 ) {if (mask &XNSUSP )xnthread_set_info (thread,XNPNDSUSP );if (mask &XNHELD )
Signature · 1 line
2.47.3