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

Function io_uring_queue_mmap

src/setup.c:170–183  ·  view source on GitHub ↗

* For users that want to specify sq_thread_cpu or sq_thread_idle, this * interface is a convenient helper for mmap()ing the rings. * Returns -errno on error, or zero on success. On success, 'ring' * contains the necessary information to read/write to the rings. */

Source from the content-addressed store, hash-verified

168 * contains the necessary information to read/write to the rings.
169 */
170__cold int io_uring_queue_mmap(int fd, struct io_uring_params *p,
171 struct io_uring *ring)
172{
173 int ret;
174
175 memset(ring, 0, sizeof(*ring));
176 ret = io_uring_mmap(fd, p, &ring->sq, &ring->cq);
177 if (!ret) {
178 ring->flags = p->flags;
179 ring->features = p->features;
180 ring->ring_fd = ring->enter_ring_fd = fd;
181 }
182 return ret;
183}
184
185static size_t io_uring_sqes_size(const struct io_uring *ring)
186{

Callers 2

mmap_childFunction · 0.85

Calls 1

io_uring_mmapFunction · 0.85

Tested by

no test coverage detected