Subversion Repositories HelenOS

Compare Revisions

Ignore whitespace Rev 2853 → Rev 2854

/branches/tracing/kernel/generic/src/proc/thread.c
422,11 → 422,25
atomic_inc(&task->refcount);
atomic_inc(&task->lifecount);
 
list_append(&t->th_link, &task->th_head);
 
/*
* Copy task debugging state to thread struct.
* The thread needs to know it is being debugged,
* otherwise it would neither stop nor respond to
* debug ops.
*/
if (t->flags & THREAD_FLAG_USPACE) {
if (task->dt_state == UDEBUG_TS_BEGINNING ||
task->dt_state == UDEBUG_TS_ACTIVE) {
t->debug_active = true;
}
}
 
/* FIXME: this must be done very carefully.. an unstoppable
thread cannot appear just-so, it must be possible to catch it. */
if (t->flags & THREAD_FLAG_USPACE)
++task->not_stoppable_count;
list_append(&t->th_link, &task->th_head);
}
 
/** Add thread to the threads tree.
/branches/tracing/kernel/generic/src/udebug/udebug.c
79,7 → 79,9
ipl = interrupts_disable();
spinlock_lock(&THREAD->debug_lock);
 
if (THREAD->debug_active == true) {
/* Must only generate events when in debugging session and have go */
if (THREAD->debug_active == true &&
THREAD->debug_stop == false) {
klog_printf("udebug_syscall_event");
call = THREAD->debug_go_call;
IPC_SET_RETVAL(call->data, 0);