Skip to content

Commit 8af1692

Browse files
committed
futex: add wake_data to struct futex_q
With handling multiple futex_q for waitv, we cannot easily go from the futex_q to data related to that request or queue. Add a wake_data argument that belongs to the wake handler assigned. Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org> Signed-off-by: Jens Axboe <axboe@kernel.dk>
1 parent 194bb58 commit 8af1692

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

kernel/futex/futex.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,7 @@ typedef void (futex_wake_fn)(struct wake_q_head *wake_q, struct futex_q *q);
148148
* @task: the task waiting on the futex
149149
* @lock_ptr: the hash bucket lock
150150
* @wake: the wake handler for this queue
151+
* @wake_data: data associated with the wake handler
151152
* @key: the key the futex is hashed on
152153
* @pi_state: optional priority inheritance state
153154
* @rt_waiter: rt_waiter storage for use with requeue_pi
@@ -173,6 +174,7 @@ struct futex_q {
173174
struct task_struct *task;
174175
spinlock_t *lock_ptr;
175176
futex_wake_fn *wake;
177+
void *wake_data;
176178
union futex_key key;
177179
struct futex_pi_state *pi_state;
178180
struct rt_mutex_waiter *rt_waiter;

0 commit comments

Comments
 (0)