summaryrefslogtreecommitdiff
path: root/kern/thread.h
diff options
context:
space:
mode:
authorRichard Braun <rbraun@sceen.net>2018-07-07 15:10:20 +0200
committerRichard Braun <rbraun@sceen.net>2018-07-07 15:10:20 +0200
commit6942b9370e09caccfb39df58f8834601b6e5af9e (patch)
tree607b8ecdfcccb74791e4ab57ef7c000c3865c648 /kern/thread.h
parent0c0e2a02a42a8161e1b8dc1e1943fe5057ecb3a3 (diff)
kern/thread: add thread name accessor
Diffstat (limited to 'kern/thread.h')
-rw-r--r--kern/thread.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/kern/thread.h b/kern/thread.h
index fd729b3d..49d8b109 100644
--- a/kern/thread.h
+++ b/kern/thread.h
@@ -712,6 +712,12 @@ thread_get_specific(unsigned int key)
return thread_tsd_get(thread_self(), key);
}
+static inline const char *
+thread_name(const struct thread *thread)
+{
+ return thread->name;
+}
+
#ifdef CONFIG_PERFMON
static inline struct perfmon_td *
thread_get_perfmon_td(struct thread *thread)