Subversion Repositories HelenOS

Compare Revisions

Ignore whitespace Rev 3034 → Rev 3035

/branches/tracing/kernel/generic/include/proc/task.h
106,8 → 106,6
mutex_t kb_cleanup_lock;
/** True if cleanup of kbox has already started */
bool kb_finished;
/** Used for waiting on kbox thread shutdown */
waitq_t kb_thread_shutdown_wq;
/** Architecture specific task data. */
task_arch_t arch;
/branches/tracing/kernel/generic/src/proc/task.c
179,7 → 179,6
ta->kb_thread = NULL;
mutex_initialize(&ta->kb_cleanup_lock);
ta->kb_finished = false;
waitq_initialize(&ta->kb_thread_shutdown_wq);
 
ipc_answerbox_init(&ta->answerbox, ta);
for (i = 0; i < IPC_MAX_PHONES; i++)
/branches/tracing/kernel/generic/src/ipc/ipc.c
513,10 → 513,11
*/
ipc_answerbox_slam_phones(&TASK->kernel_box, have_kb_thread);
/* TODO: Wait for kbox thread to terminate */
if (have_kb_thread) {
klog_printf("ipc_kbox_cleanup - wait for kbox thread to finish");
waitq_sleep(&TASK->kb_thread_shutdown_wq);
klog_printf("join kb_thread..");
thread_join(TASK->kb_thread);
klog_printf("join done");
TASK->kb_thread = NULL;
}
 
/* Answer all messages in 'calls' and 'dispatched_calls' queues */
757,8 → 758,6
}
}
 
klog_printf("kbox: done, waking up possible shutdown routine");
waitq_wakeup(&TASK->kb_thread_shutdown_wq, WAKEUP_ALL);
klog_printf("kbox: finished");
}
 
830,9 → 829,6
}
 
ta->kb_thread = kb_thread;
 
/* FIXME: we could join the kbox thread */
thread_detach(kb_thread);
thread_ready(kb_thread);
 
mutex_unlock(&ta->kb_cleanup_lock);