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