svn commit: r345100 - head/sys/compat/linuxkpi/common/include/linux
Hans Petter Selasky
hselasky at FreeBSD.org
Wed Mar 13 18:55:43 UTC 2019
Author: hselasky
Date: Wed Mar 13 18:55:41 2019
New Revision: 345100
URL: https://svnweb.freebsd.org/changeset/base/345100
Log:
Implement task_euid() and get_task_state() function macros in the LinuxKPI.
Submitted by: Johannes Lundberg <johalun0 at gmail.com>
MFC after: 1 week
Sponsored by: Limelight Networks
Sponsored by: Mellanox Technologies
Modified:
head/sys/compat/linuxkpi/common/include/linux/sched.h
Modified: head/sys/compat/linuxkpi/common/include/linux/sched.h
==============================================================================
--- head/sys/compat/linuxkpi/common/include/linux/sched.h Wed Mar 13 18:53:29 2019 (r345099)
+++ head/sys/compat/linuxkpi/common/include/linux/sched.h Wed Mar 13 18:55:41 2019 (r345100)
@@ -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)
More information about the svn-src-head
mailing list