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 <johal...@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);
_______________________________________________
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to