From 6942b9370e09caccfb39df58f8834601b6e5af9e Mon Sep 17 00:00:00 2001 From: Richard Braun Date: Sat, 7 Jul 2018 15:10:20 +0200 Subject: kern/thread: add thread name accessor --- kern/task.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'kern/task.c') diff --git a/kern/task.c b/kern/task.c index 3ad863bd..aaa30f44 100644 --- a/kern/task.c +++ b/kern/task.c @@ -212,7 +212,7 @@ task_lookup_thread(struct task *task, const char *name) spinlock_lock(&task->lock); list_for_each_entry(&task->threads, thread, task_node) { - if (strcmp(thread->name, name) == 0) { + if (strcmp(thread_name(thread), name) == 0) { thread_ref(thread); spinlock_unlock(&task->lock); return thread; @@ -263,7 +263,7 @@ task_info(struct task *task) thread_sched_class_to_str(thread_user_sched_class(thread)), thread_user_priority(thread), thread_real_global_priority(thread), - thread->name); + thread_name(thread)); } spinlock_unlock(&task->lock); -- cgit v1.2.3