193,6 → 193,34 |
} |
} |
|
/** Upon being scheduled to run, check if the current thread should stop. |
* |
* This function is called from clock(). Preemption is enabled. |
* interrupts are disabled, but since this is called after |
* being scheduled-in, we can enable them, if we're careful enough |
* not to allow arbitrary recursion. |
*/ |
void udebug_before_thread_runs(void) |
{ |
ipl_t ipl; |
|
/* This will happen if we get preempted inside this function. */ |
if (THREAD->debug_in_before_thread_runs) |
return; |
|
THREAD->debug_in_before_thread_runs = true; |
ipl = interrupts_enable(); |
|
/* Now we're free to do whatever we need (lock mutexes, etc.) */ |
|
/* Check if we're supposed to stop */ |
udebug_stoppable_begin(); |
udebug_stoppable_end(); |
|
interrupts_restore(ipl); |
THREAD->debug_in_before_thread_runs = false; |
} |
|
void udebug_syscall_event(unative_t a1, unative_t a2, unative_t a3, |
unative_t a4, unative_t a5, unative_t a6, unative_t id, unative_t rc, |
bool end_variant) |