Skip to content
This repository has been archived by the owner on Feb 26, 2020. It is now read-only.

Commit

Permalink
Add wrappers for accessing PID and command info
Browse files Browse the repository at this point in the history
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
  • Loading branch information
Prakash Surya authored and behlendorf committed Oct 16, 2013
1 parent 56d40a6 commit 09f38b7
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions include/sys/thread.h
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 09f38b7

Please sign in to comment.