| 1 | |
| 2 |
|
| 3 | #include "cancel.h"
|
| 4 |
|
| 5 | int io_futex_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe);
|
| 6 | int io_futex_wait_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe);
|
| 7 | int io_futexv_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe);
|
| 8 | int io_futex_wait(struct io_kiocb *req, unsigned int issue_flags);
|
| 9 | int io_futexv_wait(struct io_kiocb *req, unsigned int issue_flags);
|
| 10 | int io_futex_wake(struct io_kiocb *req, unsigned int issue_flags);
|
| 11 |
|
| 12 | #if defined(CONFIG_FUTEX)
|
| 13 | int io_futex_cancel(struct io_ring_ctx *ctx, struct io_cancel_data *cd,
|
| 14 | unsigned int issue_flags);
|
| 15 | bool io_futex_remove_all(struct io_ring_ctx *ctx, struct io_uring_task *tctx,
|
| 16 | bool cancel_all);
|
| 17 | bool io_futex_cache_init(struct io_ring_ctx *ctx);
|
| 18 | void io_futex_cache_free(struct io_ring_ctx *ctx);
|
| 19 | #else
|
| 20 | static inline int io_futex_cancel(struct io_ring_ctx *ctx,
|
| 21 | struct io_cancel_data *cd,
|
| 22 | unsigned int issue_flags)
|
| 23 | {
|
| 24 | return 0;
|
| 25 | }
|
| 26 | static inline bool io_futex_remove_all(struct io_ring_ctx *ctx,
|
| 27 | struct io_uring_task *tctx, bool cancel_all)
|
| 28 | {
|
| 29 | return false;
|
| 30 | }
|
| 31 | static inline bool io_futex_cache_init(struct io_ring_ctx *ctx)
|
| 32 | {
|
| 33 | return false;
|
| 34 | }
|
| 35 | static inline void io_futex_cache_free(struct io_ring_ctx *ctx)
|
| 36 | {
|
| 37 | }
|
| 38 | #endif
|