svn commit: r329963 - stable/11/sys/compat/linuxkpi/common/include/linux

Hans Petter Selasky hselasky at FreeBSD.org
Sun Feb 25 10:28:07 UTC 2018


Author: hselasky
Date: Sun Feb 25 10:28:06 2018
New Revision: 329963
URL: https://svnweb.freebsd.org/changeset/base/329963

Log:
  MFC r329475:
  Implement get_task_pid() function macro in the LinuxKPI.
  
  Submitted by:	Johannes Lundberg <johalun0 at gmail.com>
  Sponsored by:	Mellanox Technologies

Modified:
  stable/11/sys/compat/linuxkpi/common/include/linux/pid.h
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/compat/linuxkpi/common/include/linux/pid.h
==============================================================================
--- stable/11/sys/compat/linuxkpi/common/include/linux/pid.h	Sun Feb 25 10:26:44 2018	(r329962)
+++ stable/11/sys/compat/linuxkpi/common/include/linux/pid.h	Sun Feb 25 10:28:06 2018	(r329963)
@@ -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);


More information about the svn-src-all mailing list