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

Function io_uring_cqe_shift_from_flags

src/include/liburing.h:425–429  ·  view source on GitHub ↗

* Returns the bit shift needed to index the CQ. * This shift is 1 for rings with big CQEs, and 0 for rings with normal CQEs. * CQE `index` can be computed as &cq.cqes[(index & cq.ring_mask) << cqe_shift]. */

Source from the content-addressed store, hash-verified

423 * CQE `index` can be computed as &cq.cqes[(index & cq.ring_mask) << cqe_shift].
424 */
425IOURINGINLINE unsigned io_uring_cqe_shift_from_flags(unsigned flags)
426 LIBURING_NOEXCEPT
427{
428 return !!(flags & IORING_SETUP_CQE32);
429}
430
431IOURINGINLINE unsigned io_uring_cqe_shift(const struct io_uring *ring)
432 LIBURING_NOEXCEPT

Callers 2

params_cq_sizeFunction · 0.85
io_uring_cqe_shiftFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected