Date: Sat, 17 Feb 2018 22:33:26 +0000 (UTC) From: Hans Petter Selasky <hselasky@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r329475 - head/sys/compat/linuxkpi/common/include/linux Message-ID: <201802172233.w1HMXQOb004659@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: hselasky Date: Sat Feb 17 22:33:26 2018 New Revision: 329475 URL: https://svnweb.freebsd.org/changeset/base/329475 Log: Implement get_task_pid() function macro in the LinuxKPI. MFC after: 1 week Submitted by: Johannes Lundberg <johalun0@gmail.com> Sponsored by: Mellanox Technologies Modified: head/sys/compat/linuxkpi/common/include/linux/pid.h Modified: head/sys/compat/linuxkpi/common/include/linux/pid.h ============================================================================== --- head/sys/compat/linuxkpi/common/include/linux/pid.h Sat Feb 17 22:18:39 2018 (r329474) +++ head/sys/compat/linuxkpi/common/include/linux/pid.h Sat Feb 17 22:33:26 2018 (r329475) @@ -58,6 +58,11 @@ enum pid_type { __ts; \ }) +#define get_task_pid(task, type) ({ \ + CTASSERT((type) == PIDTYPE_PID); \ + (task)->task_thread->td_tid; \ +}) + struct task_struct; extern struct task_struct *linux_pid_task(pid_t); extern struct task_struct *linux_get_pid_task(pid_t);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201802172233.w1HMXQOb004659>