Changes in kernel/generic/src/ipc/kbox.c [14ecd6c:f173404] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/src/ipc/kbox.c
r14ecd6c rf173404 47 47 void ipc_kbox_cleanup(void) 48 48 { 49 ipl_t ipl;50 49 bool have_kb_thread; 51 50 … … 78 77 * kbox thread to clean it up since sender != debugger. 79 78 */ 80 ipl = interrupts_disable(); 81 spinlock_lock(&TASK->lock); 79 mutex_lock(&TASK->udebug.lock); 82 80 udebug_task_cleanup(TASK); 83 spinlock_unlock(&TASK->lock); 84 interrupts_restore(ipl); 85 81 mutex_unlock(&TASK->udebug.lock); 82 86 83 if (have_kb_thread) { 87 84 LOG("Join kb.thread."); … … 126 123 ipc_answer(&TASK->kb.box, call); 127 124 125 mutex_lock(&TASK->kb.cleanup_lock); 126 128 127 ipl = interrupts_disable(); 129 128 spinlock_lock(&TASK->lock); … … 136 135 137 136 /* Only detach kbox thread unless already terminating. */ 138 mutex_lock(&TASK->kb.cleanup_lock);139 137 if (TASK->kb.finished == false) { 140 138 /* Detach kbox thread so it gets freed from memory. */ … … 142 140 TASK->kb.thread = NULL; 143 141 } 144 mutex_unlock(&TASK->kb.cleanup_lock);145 142 146 143 LOG("Phone list is empty."); … … 153 150 spinlock_unlock(&TASK->lock); 154 151 interrupts_restore(ipl); 152 153 mutex_unlock(&TASK->kb.cleanup_lock); 155 154 } 156 155
Note:
See TracChangeset
for help on using the changeset viewer.