mirror of
https://github.com/drasko/codezero.git
synced 2026-01-12 02:43:15 +01:00
Removed zombie test and any verbose printks
This commit is contained in:
@@ -140,6 +140,14 @@ void handle_requests(void)
|
||||
break;
|
||||
}
|
||||
case L4_IPC_TAG_EXIT: {
|
||||
/* Zombie test for kernel
|
||||
struct task_ids ids;
|
||||
|
||||
l4_getid(&ids);
|
||||
|
||||
printf("\n%s: Destroying self (%d), along with any tasks.\n", __TASKNAME__, self_tid());
|
||||
l4_thread_control(THREAD_DESTROY, &ids);
|
||||
*/
|
||||
/* An exiting task has no receive phase */
|
||||
sys_exit(sender, (int)mr[0]);
|
||||
return;
|
||||
@@ -187,17 +195,11 @@ void handle_requests(void)
|
||||
|
||||
void main(void)
|
||||
{
|
||||
struct task_ids ids;
|
||||
|
||||
l4_getid(&ids);
|
||||
|
||||
printf("\n%s: Started with thread id %d\n", __TASKNAME__, self_tid());
|
||||
|
||||
init();
|
||||
|
||||
printf("\n%s: Destroying self (%d), along with any tasks.\n", __TASKNAME__, self_tid());
|
||||
l4_thread_control(THREAD_DESTROY, &ids);
|
||||
|
||||
printf("%s: Memory/Process manager initialized. Listening requests.\n", __TASKNAME__);
|
||||
while (1) {
|
||||
handle_requests();
|
||||
|
||||
@@ -171,8 +171,6 @@ void task_make_zombie(struct ktcb *task)
|
||||
wake_up_all(&task->wqh_send, 0);
|
||||
wake_up_all(&task->wqh_recv, 0);
|
||||
|
||||
printk("Thread (%d) becoming zombie. (Current: (%d))\n", task->tid, current->tid);
|
||||
|
||||
BUG_ON(!(task->flags & TASK_EXITING));
|
||||
|
||||
/* Add to zombie list, to be destroyed later */
|
||||
@@ -221,7 +219,6 @@ int task_resume(struct ktcb *task)
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/* Runs a thread for the first time */
|
||||
int thread_start(struct task_ids *ids)
|
||||
{
|
||||
@@ -434,8 +431,6 @@ static inline int thread_destroy(struct task_ids *ids)
|
||||
{
|
||||
struct ktcb *task;
|
||||
|
||||
printk("%s: Destroying (%d)\n", __FUNCTION__, ids->tid);
|
||||
|
||||
if (!(task = tcb_find(ids->tid)))
|
||||
return -ESRCH;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user