Date: Thu, 12 Sep 2019 20:15:05 +0000 (UTC) From: Johannes Lundberg <johalun@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r352264 - stable/12/sys/compat/linuxkpi/common/include/linux Message-ID: <201909122015.x8CKF5Tx066058@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: johalun Date: Thu Sep 12 20:15:04 2019 New Revision: 352264 URL: https://svnweb.freebsd.org/changeset/base/352264 Log: MFC r345100: Implement task_euid() and get_task_state() function macros in the LinuxKPI. Submitted by: Johannes Lundberg <johalun0@gmail.com> Sponsored by: Limelight Networks Sponsored by: Mellanox Technologies Modified: stable/12/sys/compat/linuxkpi/common/include/linux/sched.h Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/compat/linuxkpi/common/include/linux/sched.h ============================================================================== --- stable/12/sys/compat/linuxkpi/common/include/linux/sched.h Thu Sep 12 18:53:29 2019 (r352263) +++ stable/12/sys/compat/linuxkpi/common/include/linux/sched.h Thu Sep 12 20:15:04 2019 (r352264) @@ -96,7 +96,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)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201909122015.x8CKF5Tx066058>