Changes in kernel/generic/src/udebug/udebug_ops.c [b169619:dfa4be62] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/src/udebug/udebug_ops.c
rb169619 rdfa4be62 90 90 } 91 91 92 irq_spinlock_lock(&thread->lock, true);93 94 92 /* Verify that 'thread' is a userspace thread. */ 95 93 if (!thread->uspace) { 96 /* It's not, deny its existence */97 irq_spinlock_unlock(&thread->lock, true);98 94 mutex_unlock(&TASK->udebug.lock); 99 95 return ENOENT; 100 96 } 101 102 /* Verify debugging state. */103 if (thread->udebug.active != true) {104 /* Not in debugging session or undesired GO state */105 irq_spinlock_unlock(&thread->lock, true);106 mutex_unlock(&TASK->udebug.lock);107 return ENOENT;108 }109 110 /* Now verify that the thread belongs to the current task. */111 if (thread->task != TASK) {112 /* No such thread belonging this task */113 irq_spinlock_unlock(&thread->lock, true);114 mutex_unlock(&TASK->udebug.lock);115 return ENOENT;116 }117 118 irq_spinlock_unlock(&thread->lock, true);119 120 /* Only mutex TASK->udebug.lock left. */121 97 122 98 /* … … 126 102 */ 127 103 mutex_lock(&thread->udebug.lock); 104 105 /* Verify debugging state. */ 106 if (thread->udebug.active != true) { 107 /* Not in debugging session or undesired GO state */ 108 mutex_unlock(&thread->udebug.lock); 109 mutex_unlock(&TASK->udebug.lock); 110 return ENOENT; 111 } 112 113 /* Now verify that the thread belongs to the current task. */ 114 if (thread->task != TASK) { 115 /* No such thread belonging this task */ 116 mutex_unlock(&thread->udebug.lock); 117 mutex_unlock(&TASK->udebug.lock); 118 return ENOENT; 119 } 128 120 129 121 /* The big task mutex is no longer needed. */ … … 388 380 /* FIXME: make sure the thread isn't past debug shutdown... */ 389 381 list_foreach(TASK->threads, th_link, thread_t, thread) { 390 irq_spinlock_lock(&thread->lock, false);391 382 bool uspace = thread->uspace; 392 irq_spinlock_unlock(&thread->lock, false);393 383 394 384 /* Not interested in kernel threads. */
Note:
See TracChangeset
for help on using the changeset viewer.