mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
Create the LinuxKPI current task structure on the fly if it doesn't
exist when the current macro is used. MFC after: 1 week Sponsored by: Mellanox Technologies
This commit is contained in:
parent
16e77e0036
commit
22cbd6ef2e
1 changed files with 5 additions and 1 deletions
|
|
@ -74,7 +74,11 @@ struct task_struct {
|
|||
struct completion exited;
|
||||
};
|
||||
|
||||
#define current ((struct task_struct *)curthread->td_lkpi_task)
|
||||
#define current ({ \
|
||||
struct thread *__td = curthread; \
|
||||
linux_set_current(__td); \
|
||||
((struct task_struct *)__td->td_lkpi_task); \
|
||||
})
|
||||
|
||||
#define task_pid_group_leader(task) (task)->task_thread->td_proc->p_pid
|
||||
#define task_pid(task) ((task)->pid)
|
||||
|
|
|
|||
Loading…
Reference in a new issue