summaryrefslogtreecommitdiffstats
path: root/kernel/futex
diff options
context:
space:
mode:
authorJens Axboe <axboe@kernel.dk>2023-06-13 23:44:42 +0200
committerJens Axboe <axboe@kernel.dk>2023-09-29 10:37:01 +0200
commit8af1692616d993c93a080865a7f19506733aa462 (patch)
tree10447dfd7099b239d121c70d3019238ba48c8d33 /kernel/futex
parentio_uring: add support for futex wake and wait (diff)
downloadlinux-8af1692616d993c93a080865a7f19506733aa462.tar.xz
linux-8af1692616d993c93a080865a7f19506733aa462.zip
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>
Diffstat (limited to 'kernel/futex')
-rw-r--r--kernel/futex/futex.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/kernel/futex/futex.h b/kernel/futex/futex.h
index 33835b81e0c3..76f6c2e0f539 100644
--- a/kernel/futex/futex.h
+++ b/kernel/futex/futex.h
@@ -148,6 +148,7 @@ typedef void (futex_wake_fn)(struct wake_q_head *wake_q, struct futex_q *q);
* @task: the task waiting on the futex
* @lock_ptr: the hash bucket lock
* @wake: the wake handler for this queue
+ * @wake_data: data associated with the wake handler
* @key: the key the futex is hashed on
* @pi_state: optional priority inheritance state
* @rt_waiter: rt_waiter storage for use with requeue_pi
@@ -173,6 +174,7 @@ struct futex_q {
struct task_struct *task;
spinlock_t *lock_ptr;
futex_wake_fn *wake;
+ void *wake_data;
union futex_key key;
struct futex_pi_state *pi_state;
struct rt_mutex_waiter *rt_waiter;