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

Function t_create_ring_params

test/helpers.c:127–144  ·  view source on GitHub ↗

* Helper for setting up an io_uring instance, skipping if the given user isn't * allowed to. */

Source from the content-addressed store, hash-verified

125 * allowed to.
126 */
127enum t_setup_ret t_create_ring_params(int depth, struct io_uring *ring,
128 struct io_uring_params *p)
129{
130 int ret;
131
132 ret = io_uring_queue_init_params(depth, ring, p);
133 if (!ret)
134 return T_SETUP_OK;
135 if ((p->flags & IORING_SETUP_SQPOLL) && ret == -EPERM && geteuid()) {
136 fprintf(stdout, "SQPOLL skipped for regular user\n");
137 return T_SETUP_SKIP;
138 }
139 if (ret == -EINVAL)
140 return T_SETUP_SKIP;
141
142 fprintf(stderr, "queue_init: %s\n", strerror(-ret));
143 return ret;
144}
145
146enum t_setup_ret t_create_ring(int depth, struct io_uring *ring,
147 unsigned int flags)

Callers 15

test_accept_sqpollFunction · 0.85
setup_ring_opsFunction · 0.85
mainFunction · 0.85
mainFunction · 0.85
mainFunction · 0.85
recv_fnFunction · 0.85
test_recv_incrFunction · 0.85
recv_fnFunction · 0.85
recv_fnFunction · 0.85
mainFunction · 0.85

Calls 1

Tested by 3

test_accept_sqpollFunction · 0.68
test_recv_incrFunction · 0.68