aboutsummaryrefslogtreecommitdiff
path: root/sys/compat/linuxkpi/common/include/linux/sched.h
diff options
context:
space:
mode:
authorHans Petter Selasky <hselasky@FreeBSD.org>2019-03-13 18:55:41 +0000
committerHans Petter Selasky <hselasky@FreeBSD.org>2019-03-13 18:55:41 +0000
commit5746b1cd46e48a024a71e7ddf8538f6ec1d6632a (patch)
treed724ba0f0ba5070e01ee442e7820e532af24c573 /sys/compat/linuxkpi/common/include/linux/sched.h
parentc7486758ebe08414423c719ec74a9bba2c35a3ef (diff)
downloadsrc-5746b1cd46e48a024a71e7ddf8538f6ec1d6632a.tar.gz
src-5746b1cd46e48a024a71e7ddf8538f6ec1d6632a.zip
Implement task_euid() and get_task_state() function macros in the LinuxKPI.
Submitted by: Johannes Lundberg <johalun0@gmail.com> MFC after: 1 week Sponsored by: Limelight Networks Sponsored by: Mellanox Technologies
Notes
Notes: svn path=/head/; revision=345100
Diffstat (limited to 'sys/compat/linuxkpi/common/include/linux/sched.h')
-rw-r--r--sys/compat/linuxkpi/common/include/linux/sched.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/compat/linuxkpi/common/include/linux/sched.h b/sys/compat/linuxkpi/common/include/linux/sched.h
index f95787212488..73807d3d454e 100644
--- a/sys/compat/linuxkpi/common/include/linux/sched.h
+++ b/sys/compat/linuxkpi/common/include/linux/sched.h
@@ -95,7 +95,9 @@ struct task_struct {
#define get_pid(x) (x)
#define put_pid(x) do { } while (0)
#define current_euid() (curthread->td_ucred->cr_uid)
+#define task_euid(task) ((task)->task_thread->td_ucred->cr_uid)
+#define get_task_state(task) atomic_read(&(task)->state)
#define set_task_state(task, x) atomic_set(&(task)->state, (x))
#define __set_task_state(task, x) ((task)->state.counter = (x))
#define set_current_state(x) set_task_state(current, x)