Define some more LinuxKPI task related macros.

Obtained from:		kmacy @
MFC after:		1 week
Sponsored by:		Mellanox Technologies
This commit is contained in:
Hans Petter Selasky 2017-03-16 12:33:34 +00:00
parent f24fc4834a
commit b8a8ed7c96
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=315410

View File

@ -69,6 +69,12 @@ struct task_struct {
#define current ((struct task_struct *)curthread->td_lkpi_task)
#define task_pid(task) ((task)->task_thread->td_proc->p_pid)
#define task_pid_nr(task) ((task)->task_thread->td_tid)
#define get_pid(x) (x)
#define put_pid(x)
#define current_euid() (curthread->td_ucred->cr_uid)
#define set_current_state(x) \
atomic_store_rel_int((volatile int *)&current->state, (x))
#define __set_current_state(x) current->state = (x)