Rev 3014 | Rev 3016 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 3014 | Rev 3015 | ||
---|---|---|---|
Line 191... | Line 191... | ||
191 | spinlock_unlock(&TASK->lock); |
191 | spinlock_unlock(&TASK->lock); |
192 | interrupts_restore(ipl); |
192 | interrupts_restore(ipl); |
193 | } |
193 | } |
194 | } |
194 | } |
195 | 195 | ||
- | 196 | /** Upon being scheduled to run, check if the current thread should stop. |
|
- | 197 | * |
|
- | 198 | * This function is called from clock(). Preemption is enabled. |
|
- | 199 | * interrupts are disabled, but since this is called after |
|
- | 200 | * being scheduled-in, we can enable them, if we're careful enough |
|
- | 201 | * not to allow arbitrary recursion. |
|
- | 202 | */ |
|
- | 203 | void udebug_before_thread_runs(void) |
|
- | 204 | { |
|
- | 205 | ipl_t ipl; |
|
- | 206 | ||
- | 207 | /* This will happen if we get preempted inside this function. */ |
|
- | 208 | if (THREAD->debug_in_before_thread_runs) |
|
- | 209 | return; |
|
- | 210 | ||
- | 211 | THREAD->debug_in_before_thread_runs = true; |
|
- | 212 | ipl = interrupts_enable(); |
|
- | 213 | ||
- | 214 | /* Now we're free to do whatever we need (lock mutexes, etc.) */ |
|
- | 215 | ||
- | 216 | /* Check if we're supposed to stop */ |
|
- | 217 | udebug_stoppable_begin(); |
|
- | 218 | udebug_stoppable_end(); |
|
- | 219 | ||
- | 220 | interrupts_restore(ipl); |
|
- | 221 | THREAD->debug_in_before_thread_runs = false; |
|
- | 222 | } |
|
- | 223 | ||
196 | void udebug_syscall_event(unative_t a1, unative_t a2, unative_t a3, |
224 | void udebug_syscall_event(unative_t a1, unative_t a2, unative_t a3, |
197 | unative_t a4, unative_t a5, unative_t a6, unative_t id, unative_t rc, |
225 | unative_t a4, unative_t a5, unative_t a6, unative_t id, unative_t rc, |
198 | bool end_variant) |
226 | bool end_variant) |
199 | { |
227 | { |
200 | call_t *call; |
228 | call_t *call; |