aboutsummaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorHans Petter Selasky <hselasky@FreeBSD.org>2017-03-16 12:33:34 +0000
committerHans Petter Selasky <hselasky@FreeBSD.org>2017-03-16 12:33:34 +0000
commitb8a8ed7c96498eeff9591916eb22ce261fc92c7a (patch)
treeb6d62606afcb1bfe96b6c0267aef598566ad5c8c /sys
parentf24fc4834ae3680bcf9c54733a8b7311191017ea (diff)
downloadsrc-b8a8ed7c96498eeff9591916eb22ce261fc92c7a.tar.gz
src-b8a8ed7c96498eeff9591916eb22ce261fc92c7a.zip
Define some more LinuxKPI task related macros.
Obtained from: kmacy @ MFC after: 1 week Sponsored by: Mellanox Technologies
Notes
Notes: svn path=/head/; revision=315410
Diffstat (limited to 'sys')
-rw-r--r--sys/compat/linuxkpi/common/include/linux/sched.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/sys/compat/linuxkpi/common/include/linux/sched.h b/sys/compat/linuxkpi/common/include/linux/sched.h
index 04abc8230775..19a2996d2c7c 100644
--- a/sys/compat/linuxkpi/common/include/linux/sched.h
+++ b/sys/compat/linuxkpi/common/include/linux/sched.h
@@ -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)