aboutsummaryrefslogtreecommitdiffstats
path: root/include/sys/thread.h
diff options
context:
space:
mode:
authorPrakash Surya <[email protected]>2013-09-24 16:11:56 -0700
committerBrian Behlendorf <[email protected]>2013-10-16 14:48:35 -0700
commit09f38b7e60eea27637780822f86f80da8938bb1f (patch)
tree2d9726acbb791ace5bb416902a18a7215e8fd7f9 /include/sys/thread.h
parent56d40a686b0504042a088943154ba7b0dde36d51 (diff)
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 <[email protected]> Signed-off-by: Brian Behlendorf <[email protected]> Issue #296
Diffstat (limited to 'include/sys/thread.h')
-rw-r--r--include/sys/thread.h2
1 files changed, 2 insertions, 0 deletions
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,