[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20230728164235.1318118-10-axboe@kernel.dk>
Date: Fri, 28 Jul 2023 10:42:32 -0600
From: Jens Axboe <axboe@...nel.dk>
To: io-uring@...r.kernel.org, linux-kernel@...r.kernel.org
Cc: peterz@...radead.org, andres@...razel.de, tglx@...utronix.de,
Jens Axboe <axboe@...nel.dk>
Subject: [PATCH 09/12] 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.
Signed-off-by: Jens Axboe <axboe@...nel.dk>
---
kernel/futex/futex.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/kernel/futex/futex.h b/kernel/futex/futex.h
index e04c74a34832..4633c99ea4b6 100644
--- a/kernel/futex/futex.h
+++ b/kernel/futex/futex.h
@@ -146,6 +146,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
@@ -171,6 +172,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;
--
2.40.1
Powered by blists - more mailing lists