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