From 09f38b7e60eea27637780822f86f80da8938bb1f Mon Sep 17 00:00:00 2001 From: Prakash Surya Date: Tue, 24 Sep 2013 16:11:56 -0700 Subject: [PATCH] Add wrappers for accessing PID and command info This change adds simple wrappers for accessing a thread's PID and command character string. Signed-off-by: Prakash Surya Signed-off-by: Brian Behlendorf Issue #296 --- include/sys/thread.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/sys/thread.h b/include/sys/thread.h index 369b3061d..864a74bba 100644 --- a/include/sys/thread.h +++ b/include/sys/thread.h @@ -51,6 +51,8 @@ typedef void (*thread_func_t)(void *); #define thread_exit() __thread_exit() #define thread_join(t) VERIFY(0) #define curthread current +#define getcomm() current->comm +#define getpid() current->pid extern kthread_t *__thread_create(caddr_t stk, size_t stksize, thread_func_t func, const char *name,