From: Prakash Surya Date: Tue, 24 Sep 2013 23:11:56 +0000 (-0700) Subject: Add wrappers for accessing PID and command info X-Git-Tag: zfs-0.8.0-rc1~152^2~255^2~3 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=09f38b7e60eea27637780822f86f80da8938bb1f;p=zfs 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 --- 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,