summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorhselasky <hselasky@FreeBSD.org>2018-02-25 10:28:06 +0000
committerhselasky <hselasky@FreeBSD.org>2018-02-25 10:28:06 +0000
commitaa05c886f37f1b3a5cd369b5df229f9c16b00898 (patch)
treebb70eed849964ecd9406b8fa22dec814046d96eb
parent121ed165414b1a2587061adf792edc21cc9f62a9 (diff)
downloadFreeBSD-src-aa05c886f37f1b3a5cd369b5df229f9c16b00898.zip
FreeBSD-src-aa05c886f37f1b3a5cd369b5df229f9c16b00898.tar.gz
MFC r329475:
Implement get_task_pid() function macro in the LinuxKPI. Submitted by: Johannes Lundberg <johalun0@gmail.com> Sponsored by: Mellanox Technologies
-rw-r--r--sys/compat/linuxkpi/common/include/linux/pid.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/sys/compat/linuxkpi/common/include/linux/pid.h b/sys/compat/linuxkpi/common/include/linux/pid.h
index 2c7e0ea..73d8f1f 100644
--- a/sys/compat/linuxkpi/common/include/linux/pid.h
+++ b/sys/compat/linuxkpi/common/include/linux/pid.h
@@ -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);
OpenPOWER on IntegriCloud