summaryrefslogtreecommitdiff
path: root/kern/task.c
diff options
context:
space:
mode:
authorJustus Winter <4winter@informatik.uni-hamburg.de>2014-02-01 02:15:05 +0100
committerJustus Winter <4winter@informatik.uni-hamburg.de>2014-02-01 16:38:08 +0100
commitdf47f83ed98e4ce356af8d34de05b549f4f9c912 (patch)
tree45165e5a32c145c24cef230da20cf54c4997344f /kern/task.c
parentfe7cd805567e1f4d1ed92d87b216e2dc78249892 (diff)
kern: add a name field to struct task
* kern/task.c (task_create): Initialize name with the address of the task. * kern/task.h (TASK_NAME_SIZE): New definition. (struct task): Add field name.
Diffstat (limited to 'kern/task.c')
-rw-r--r--kern/task.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/kern/task.c b/kern/task.c
index 13b3c761..0b5a6f7f 100644
--- a/kern/task.c
+++ b/kern/task.c
@@ -45,6 +45,7 @@
#include <kern/slab.h>
#include <kern/kalloc.h>
#include <kern/processor.h>
+#include <kern/printf.h>
#include <kern/sched_prim.h> /* for thread_wakeup */
#include <kern/ipc_tt.h>
#include <kern/syscall_emulation.h>
@@ -164,6 +165,8 @@ kern_return_t task_create(
}
#endif /* FAST_TAS */
+ snprintf (new_task->name, sizeof new_task->name, "%p", new_task);
+
ipc_task_enable(new_task);
*child_task = new_task;