Lines Matching defs:iof

62 	struct io_futex *iof = io_kiocb_to_cmd(req, struct io_futex);
67 if (!iof->futexv_unqueued) {
70 res = futex_unqueue_multiple(futexv, iof->futex_nr);
79 static bool io_futexv_claim(struct io_futex *iof)
81 if (test_bit(0, &iof->futexv_owned) ||
82 test_and_set_bit_lock(0, &iof->futexv_owned))
97 struct io_futex *iof = io_kiocb_to_cmd(req, struct io_futex);
99 if (!io_futexv_claim(iof))
124 struct io_futex *iof = io_kiocb_to_cmd(req, struct io_futex);
131 iof->uaddr = u64_to_user_ptr(READ_ONCE(sqe->addr));
132 iof->futex_val = READ_ONCE(sqe->addr2);
133 iof->futex_mask = READ_ONCE(sqe->addr3);
139 iof->futex_flags = futex2_to_flags(flags);
140 if (!futex_flags_valid(iof->futex_flags))
143 if (!futex_validate_input(iof->futex_flags, iof->futex_val) ||
144 !futex_validate_input(iof->futex_flags, iof->futex_mask))
155 struct io_futex *iof = io_kiocb_to_cmd(req, struct io_futex);
157 if (!io_futexv_claim(iof))
169 struct io_futex *iof = io_kiocb_to_cmd(req, struct io_futex);
178 iof->uaddr = u64_to_user_ptr(READ_ONCE(sqe->addr));
179 iof->futex_nr = READ_ONCE(sqe->len);
180 if (!iof->futex_nr || iof->futex_nr > FUTEX_WAITV_MAX)
183 futexv = kcalloc(iof->futex_nr, sizeof(*futexv), GFP_KERNEL);
187 ret = futex_parse_waitv(futexv, iof->uaddr, iof->futex_nr,
196 iof->futexv_owned = 0;
197 iof->futexv_unqueued = 0;
218 struct io_futex *iof = io_kiocb_to_cmd(req, struct io_futex);
225 ret = futex_wait_multiple_setup(futexv, iof->futex_nr, &woken);
260 iof->futexv_unqueued = 1;
271 struct io_futex *iof = io_kiocb_to_cmd(req, struct io_futex);
276 if (!iof->futex_mask) {
291 ifd->q.bitset = iof->futex_mask;
295 ret = futex_wait_setup(iof->uaddr, iof->futex_val, iof->futex_flags,
316 struct io_futex *iof = io_kiocb_to_cmd(req, struct io_futex);
323 ret = futex_wake(iof->uaddr, FLAGS_STRICT | iof->futex_flags,
324 iof->futex_val, iof->futex_mask);