Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 25 Feb 2018 10:28:06 +0000 (UTC)
From:      Hans Petter Selasky <hselasky@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org
Subject:   svn commit: r329963 - stable/11/sys/compat/linuxkpi/common/include/linux
Message-ID:  <201802251028.w1PAS64v013205@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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@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);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201802251028.w1PAS64v013205>