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

Function submit_cmd_sqe

test/socket-getsetsock-cmd.c:54–78  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

52}
53
54static int submit_cmd_sqe(struct io_uring *ring, int32_t fd,
55 int op, int level, int optname,
56 void *optval, int optlen,
57 bool async)
58{
59 struct io_uring_sqe *sqe;
60 int err;
61
62 assert(fd > 0);
63
64 sqe = io_uring_get_sqe(ring);
65 assert(sqe != NULL);
66
67 io_uring_prep_cmd_sock(sqe, op, fd, level, optname, optval, optlen);
68 sqe->user_data = USERDATA;
69 if (async)
70 sqe->flags |= IOSQE_ASYNC;
71
72 /* Submitting SQE */
73 err = io_uring_submit_and_wait(ring, 1);
74 if (err != 1)
75 fprintf(stderr, "Failure: io_uring_submit_and_wait returned %d\n", err);
76
77 return err;
78}
79
80static int receive_cqe(struct io_uring *ring)
81{

Callers 4

run_get_rcvbufFunction · 0.85
run_get_peernameFunction · 0.85
run_setsockopt_reuseportFunction · 0.85

Calls 3

io_uring_prep_cmd_sockFunction · 0.85
io_uring_submit_and_waitFunction · 0.85
io_uring_get_sqeFunction · 0.50

Tested by

no test coverage detected