_user_debug_thread(): Use new signal SIGNAL_DEBUG_THREAD

This resolves a TODO: We used thread_interrupt() to wake up the thread
from an interruptable wait. However, if the thread was already in the
kernel and about to start waiting, that would have no effect and the
thread would wait anyway. Now there's the new non-blockable signal
SIGNAL_DEBUG_THREAD, which is sent to the thread instead, making sure
that thread doesn't start waiting.
This commit is contained in:
Ingo Weinhold
2016-04-24 11:54:17 +02:00
parent 3218cf3b36
commit 7a187cd629
3 changed files with 34 additions and 25 deletions
+4
View File
@@ -36,6 +36,10 @@ using BKernel::Thread;
#define SYSCALL_RESTART_PARAMETER_SIZE 32
// kernel-internal signals
#define SIGNAL_DEBUG_THREAD 62
// Debug a thread. Used together with the B_THREAD_DEBUG_STOP thread debug
// flag. Continues the thread, if suspended, but has no effect otherwise.
// Non-blockable.
#define SIGNAL_CANCEL_THREAD 63
// Cancel a thread. Non-blockable.
#define SIGNAL_CONTINUE_THREAD 64