From 6651781c9f4ef5dcf88d083a5a14a82ed0af22f5 Mon Sep 17 00:00:00 2001 From: Jens Axboe Date: Tue, 25 Jul 2023 15:26:09 -0600 Subject: [PATCH] Update for new prep_futex_waitv() prototype Signed-off-by: Jens Axboe --- src/include/liburing.h | 8 +++----- test/futex.c | 10 +++++----- 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/src/include/liburing.h b/src/include/liburing.h index 6e6ed00d8..c0f5c3c2b 100644 --- a/src/include/liburing.h +++ b/src/include/liburing.h @@ -1183,12 +1183,10 @@ IOURINGINLINE void io_uring_prep_futex_wait(struct io_uring_sqe *sqe, struct futex_waitv; IOURINGINLINE void io_uring_prep_futex_waitv(struct io_uring_sqe *sqe, struct futex_waitv *futex, - uint32_t nr_futex, uint64_t val, - uint64_t mask, uint32_t flags) + uint32_t nr_futex, uint32_t flags) { - io_uring_prep_rw(IORING_OP_FUTEX_WAITV, sqe, 0, futex, nr_futex, val); - sqe->futex_flags = flags | 2; /* FLAGS_SIZE_32 */ - sqe->addr3 = mask; + io_uring_prep_rw(IORING_OP_FUTEX_WAITV, sqe, 0, futex, nr_futex, 0); + sqe->futex_flags = flags; } /* diff --git a/test/futex.c b/test/futex.c index ca1a24f04..8bb02b1c1 100644 --- a/test/futex.c +++ b/test/futex.c @@ -74,7 +74,7 @@ static int __test(struct io_uring *ring, int vectored, int async, sqe = io_uring_get_sqe(ring); if (vectored) - io_uring_prep_futex_waitv(sqe, fw, nfutex, 0, FUTEX_BITSET_MATCH_ANY, 0); + io_uring_prep_futex_waitv(sqe, fw, nfutex, 0); else io_uring_prep_futex_wait(sqe, futex, 0, FUTEX_BITSET_MATCH_ANY, 0); if (async) @@ -167,14 +167,14 @@ static int test_order(int vectored, int async) if (!vectored) io_uring_prep_futex_wait(sqe, futex, 0, FUTEX_BITSET_MATCH_ANY, 0); else - io_uring_prep_futex_waitv(sqe, &fw, 1, 0, FUTEX_BITSET_MATCH_ANY, 0); + io_uring_prep_futex_waitv(sqe, &fw, 1, 0); sqe->user_data = 1; sqe = io_uring_get_sqe(&ring); if (!vectored) io_uring_prep_futex_wait(sqe, futex, 0, FUTEX_BITSET_MATCH_ANY, 0); else - io_uring_prep_futex_waitv(sqe, &fw, 1, 0, FUTEX_BITSET_MATCH_ANY, 0); + io_uring_prep_futex_waitv(sqe, &fw, 1, 0); sqe->user_data = 2; io_uring_submit(&ring); @@ -247,14 +247,14 @@ static int test_multi_wake(int vectored) if (!vectored) io_uring_prep_futex_wait(sqe, futex, 0, FUTEX_BITSET_MATCH_ANY, 0); else - io_uring_prep_futex_waitv(sqe, &fw, 1, 0, FUTEX_BITSET_MATCH_ANY, 0); + io_uring_prep_futex_waitv(sqe, &fw, 1, 0); sqe->user_data = 1; sqe = io_uring_get_sqe(&ring); if (!vectored) io_uring_prep_futex_wait(sqe, futex, 0, FUTEX_BITSET_MATCH_ANY, 0); else - io_uring_prep_futex_waitv(sqe, &fw, 1, 0, FUTEX_BITSET_MATCH_ANY, 0); + io_uring_prep_futex_waitv(sqe, &fw, 1, 0); sqe->user_data = 2; io_uring_submit(&ring);