Changes in kernel/generic/src/udebug/udebug_ops.c [dfa4be62:b169619] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/src/udebug/udebug_ops.c
rdfa4be62 rb169619 90 90 } 91 91 92 irq_spinlock_lock(&thread->lock, true); 93 92 94 /* Verify that 'thread' is a userspace thread. */ 93 95 if (!thread->uspace) { 96 /* It's not, deny its existence */ 97 irq_spinlock_unlock(&thread->lock, true); 94 98 mutex_unlock(&TASK->udebug.lock); 95 99 return ENOENT; 96 100 } 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. */ 97 121 98 122 /* … … 102 126 */ 103 127 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 }120 128 121 129 /* The big task mutex is no longer needed. */ … … 380 388 /* FIXME: make sure the thread isn't past debug shutdown... */ 381 389 list_foreach(TASK->threads, th_link, thread_t, thread) { 390 irq_spinlock_lock(&thread->lock, false); 382 391 bool uspace = thread->uspace; 392 irq_spinlock_unlock(&thread->lock, false); 383 393 384 394 /* Not interested in kernel threads. */
Note:
See TracChangeset
for help on using the changeset viewer.