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

Function io_uring_load_sq_head

src/include/liburing.h:1708–1720  ·  view source on GitHub ↗

Read the kernel's SQ head index with appropriate memory ordering */

Source from the content-addressed store, hash-verified

1706
1707/* Read the kernel's SQ head index with appropriate memory ordering */
1708IOURINGINLINE unsigned io_uring_load_sq_head(const struct io_uring *ring)
1709 LIBURING_NOEXCEPT
1710{
1711 /*
1712 * Without acquire ordering, we could overwrite a SQE before the kernel
1713 * finished reading it. We don't need the acquire ordering for
1714 * non-SQPOLL since then we drive updates.
1715 */
1716 if (ring->flags & IORING_SETUP_SQPOLL)
1717 return io_uring_smp_load_acquire(ring->sq.khead);
1718
1719 return *ring->sq.khead;
1720}
1721
1722/*
1723 * Returns number of unconsumed (if SQPOLL) or unsubmitted entries exist in

Callers 4

liburing_sanitize_ringFunction · 0.85
io_uring_sq_readyFunction · 0.85
_io_uring_get_sqeFunction · 0.85
io_uring_get_sqe128Function · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected