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

Function queue_accept_conn

test/accept.c:115–139  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

113}
114
115static void queue_accept_conn(struct io_uring *ring, int fd,
116 struct accept_test_args args)
117{
118 struct io_uring_sqe *sqe;
119 int ret;
120 int fixed_idx = args.fixed ? 0 : -1;
121 int count = 1 + args.extra_loops;
122
123 if (args.multishot) {
124 queue_accept_multishot(ring, fd, INITIAL_USER_DATA, args.fixed);
125 return;
126 }
127
128 while (count--) {
129 sqe = io_uring_get_sqe(ring);
130 if (fixed_idx < 0) {
131 io_uring_prep_accept(sqe, fd, NULL, NULL, 0);
132 } else {
133 io_uring_prep_accept_direct(sqe, fd, NULL, NULL,
134 0, fixed_idx);
135 }
136 ret = io_uring_submit(ring);
137 assert(ret != -1);
138 }
139}
140
141static int accept_conn(struct io_uring *ring, int fixed_idx, int *multishot, int fd)
142{

Callers 2

test_loopFunction · 0.85
testFunction · 0.85

Calls 3

queue_accept_multishotFunction · 0.85
io_uring_submitFunction · 0.85
io_uring_get_sqeFunction · 0.50

Tested by 1

test_loopFunction · 0.68