Rev 2826 | Rev 2848 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 2826 | Rev 2834 | ||
---|---|---|---|
Line 75... | Line 75... | ||
75 | { |
75 | { |
76 | call_t *call; |
76 | call_t *call; |
77 | ipl_t ipl; |
77 | ipl_t ipl; |
78 | 78 | ||
79 | ipl = interrupts_disable(); |
79 | ipl = interrupts_disable(); |
80 | spinlock_lock(&TASK->lock); |
80 | spinlock_lock(&THREAD->lock); |
81 | 81 | ||
82 | if (TASK->dt_state == UDEBUG_TS_ACTIVE) { |
82 | if (THREAD->debug_active == true) { |
83 | klog_printf("udebug_syscall_event"); |
83 | klog_printf("udebug_syscall_event"); |
84 | call = THREAD->debug_go_call; |
84 | call = THREAD->debug_go_call; |
85 | IPC_SET_RETVAL(call->data, 0); |
85 | IPC_SET_RETVAL(call->data, 0); |
86 | IPC_SET_ARG1(call->data, UDEBUG_EVENT_SYSCALL); |
86 | IPC_SET_ARG1(call->data, UDEBUG_EVENT_SYSCALL); |
87 | IPC_SET_ARG2(call->data, id); |
87 | IPC_SET_ARG2(call->data, id); |
Line 99... | Line 99... | ||
99 | * Make sure debug_stop is true when going to sleep |
99 | * Make sure debug_stop is true when going to sleep |
100 | * in case we get woken up by DEBUG_END. (At which |
100 | * in case we get woken up by DEBUG_END. (At which |
101 | * point it must be back to the initial true value). |
101 | * point it must be back to the initial true value). |
102 | */ |
102 | */ |
103 | THREAD->debug_stop = true; |
103 | THREAD->debug_stop = true; |
- | 104 | spinlock_unlock(&THREAD->lock); |
|
104 | 105 | ||
- | 106 | spinlock_lock(&TASK->lock); |
|
105 | ipc_answer(&TASK->answerbox, THREAD->debug_go_call); |
107 | ipc_answer(&TASK->answerbox, THREAD->debug_go_call); |
106 | spinlock_unlock(&TASK->lock); |
108 | spinlock_unlock(&TASK->lock); |
- | 109 | ||
107 | interrupts_restore(ipl); |
110 | interrupts_restore(ipl); |
108 | 111 | ||
109 | waitq_sleep(&THREAD->go_wq); |
112 | waitq_sleep(&THREAD->go_wq); |
110 | } else { |
113 | } else { |
111 | spinlock_unlock(&TASK->lock); |
114 | spinlock_unlock(&THREAD->lock); |
112 | interrupts_restore(ipl); |
115 | interrupts_restore(ipl); |
113 | } |
116 | } |
114 | } |
117 | } |
115 | 118 | ||
116 | /** @} |
119 | /** @} |