summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJustus Winter <4winter@informatik.uni-hamburg.de>2014-10-16 18:13:39 +0200
committerJustus Winter <4winter@informatik.uni-hamburg.de>2015-02-25 16:23:12 +0100
commitfe820bd2e22e5a0b5aa5bd50de3b06759e42af78 (patch)
tree609b85339adf9144aefb090bd8b5d69bb57494a1
parentd3f20b06cee70fd5afe8aaff31614756a57e6bb6 (diff)
kern: inherit the name of the parent task
* kern/task.c (task_create): Inherit the name of the parent task.
-rw-r--r--kern/task.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/kern/task.c b/kern/task.c
index a11fb8ee..57e7f413 100644
--- a/kern/task.c
+++ b/kern/task.c
@@ -171,7 +171,12 @@ kern_return_t task_create(
}
#endif /* FAST_TAS */
- snprintf (new_task->name, sizeof new_task->name, "%p", new_task);
+ if (parent_task == TASK_NULL)
+ snprintf (new_task->name, sizeof new_task->name, "%p",
+ new_task);
+ else
+ snprintf (new_task->name, sizeof new_task->name, "(%.*s)",
+ sizeof new_task->name - 3, parent_task->name);
if (new_task_notification != NULL) {
task_reference (new_task);