MCPcopy Create free account
hub / github.com/axboe/liburing / __io_uring_submit_and_wait_timeout

Function __io_uring_submit_and_wait_timeout

src/queue.c:406–439  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

404}
405
406static int __io_uring_submit_and_wait_timeout(struct io_uring *ring,
407 struct io_uring_cqe **cqe_ptr, unsigned wait_nr,
408 struct __kernel_timespec *ts,
409 unsigned int min_wait, sigset_t *sigmask)
410{
411 int to_submit;
412
413 if (ts) {
414 if (ring->features & IORING_FEAT_EXT_ARG) {
415 struct io_uring_getevents_arg arg = {
416 .sigmask = (unsigned long) sigmask,
417 .sigmask_sz = _NSIG / 8,
418 .min_wait_usec = min_wait,
419 .ts = (unsigned long) ts
420 };
421 struct get_data data = {
422 .submit = __io_uring_flush_sq(ring),
423 .wait_nr = wait_nr,
424 .get_flags = IORING_ENTER_EXT_ARG,
425 .sz = sizeof(arg),
426 .has_ts = ts != NULL,
427 .arg = &arg
428 };
429
430 return _io_uring_get_cqe(ring, cqe_ptr, &data);
431 }
432 to_submit = __io_uring_submit_timeout(ring, wait_nr, ts);
433 if (to_submit < 0)
434 return to_submit;
435 } else
436 to_submit = __io_uring_flush_sq(ring);
437
438 return __io_uring_get_cqe(ring, cqe_ptr, to_submit, wait_nr, sigmask);
439}
440
441int io_uring_submit_and_wait_min_timeout(struct io_uring *ring,
442 struct io_uring_cqe **cqe_ptr,

Calls 4

_io_uring_get_cqeFunction · 0.85
__io_uring_get_cqeFunction · 0.85
__io_uring_flush_sqFunction · 0.70

Tested by

no test coverage detected