.. | .. |
---|
4 | 4 | |
---|
5 | 5 | #include <linux/spinlock.h> |
---|
6 | 6 | #include <linux/list.h> |
---|
| 7 | +#include <linux/mutex.h> |
---|
7 | 8 | #include <linux/alarmtimer.h> |
---|
8 | 9 | #include <linux/timerqueue.h> |
---|
9 | 10 | #include <linux/task_work.h> |
---|
.. | .. |
---|
63 | 64 | * cpu_timer - Posix CPU timer representation for k_itimer |
---|
64 | 65 | * @node: timerqueue node to queue in the task/sig |
---|
65 | 66 | * @head: timerqueue head on which this timer is queued |
---|
66 | | - * @task: Pointer to target task |
---|
| 67 | + * @pid: Pointer to target task PID |
---|
67 | 68 | * @elist: List head for the expiry list |
---|
68 | 69 | * @firing: Timer is currently firing |
---|
| 70 | + * @handling: Pointer to the task which handles expiry |
---|
69 | 71 | */ |
---|
70 | 72 | struct cpu_timer { |
---|
71 | | - struct timerqueue_node node; |
---|
72 | | - struct timerqueue_head *head; |
---|
73 | | - struct pid *pid; |
---|
74 | | - struct list_head elist; |
---|
75 | | - int firing; |
---|
| 73 | + struct timerqueue_node node; |
---|
| 74 | + struct timerqueue_head *head; |
---|
| 75 | + struct pid *pid; |
---|
| 76 | + struct list_head elist; |
---|
| 77 | + int firing; |
---|
| 78 | + struct task_struct __rcu *handling; |
---|
76 | 79 | }; |
---|
77 | 80 | |
---|
78 | 81 | static inline bool cpu_timer_enqueue(struct timerqueue_head *head, |
---|
.. | .. |
---|
129 | 132 | /** |
---|
130 | 133 | * posix_cputimers_work - Container for task work based posix CPU timer expiry |
---|
131 | 134 | * @work: The task work to be scheduled |
---|
| 135 | + * @mutex: Mutex held around expiry in context of this task work |
---|
132 | 136 | * @scheduled: @work has been scheduled already, no further processing |
---|
133 | 137 | */ |
---|
134 | 138 | struct posix_cputimers_work { |
---|
135 | 139 | struct callback_head work; |
---|
| 140 | + struct mutex mutex; |
---|
136 | 141 | unsigned int scheduled; |
---|
137 | 142 | }; |
---|
138 | 143 | |
---|