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

Function submit_and_wait

test/connect.c:40–60  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

38}
39
40static int submit_and_wait(struct io_uring *ring, int *res)
41{
42 struct io_uring_cqe *cqe;
43 int ret;
44
45 ret = io_uring_submit_and_wait(ring, 1);
46 if (ret != 1) {
47 fprintf(stderr, "io_using_submit: got %d\n", ret);
48 return 1;
49 }
50
51 ret = io_uring_peek_cqe(ring, &cqe);
52 if (ret) {
53 fprintf(stderr, "io_uring_peek_cqe(): no cqe returned");
54 return 1;
55 }
56
57 *res = cqe->res;
58 io_uring_cqe_seen(ring, cqe);
59 return 0;
60}
61
62static int wait_for(struct io_uring *ring, int fd, int mask)
63{

Callers 2

wait_forFunction · 0.85
connect_socketFunction · 0.85

Calls 1

io_uring_submit_and_waitFunction · 0.85

Tested by

no test coverage detected