mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
Implement get_task_pid() function macro in the LinuxKPI.
MFC after: 1 week Submitted by: Johannes Lundberg <johalun0@gmail.com> Sponsored by: Mellanox Technologies
This commit is contained in:
parent
b216e997af
commit
94b9710bc7
1 changed files with 5 additions and 0 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in a new issue