]> granicus.if.org Git - zfs/commitdiff
Add wrappers for accessing PID and command info
authorPrakash Surya <surya1@llnl.gov>
Tue, 24 Sep 2013 23:11:56 +0000 (16:11 -0700)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Wed, 16 Oct 2013 21:48:35 +0000 (14:48 -0700)
This change adds simple wrappers for accessing a thread's PID and
command character string.

Signed-off-by: Prakash Surya <surya1@llnl.gov>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Issue #296

include/sys/thread.h

index 369b3061d277471bb07a781193594fcd6b5d9887..864a74bba99d2199d498aff56cfd0f153aec2354 100644 (file)
@@ -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,