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

Function queue_recv

test/accept.c:79–95  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

77}
78
79static void *queue_recv(struct io_uring *ring, int fd, bool fixed)
80{
81 struct io_uring_sqe *sqe;
82 struct data *d;
83
84 d = t_malloc(sizeof(*d));
85 d->iov.iov_base = d->buf;
86 d->iov.iov_len = sizeof(d->buf);
87
88 sqe = io_uring_get_sqe(ring);
89 io_uring_prep_readv(sqe, fd, &d->iov, 1, 0);
90 sqe->user_data = 2;
91 if (fixed)
92 sqe->flags |= IOSQE_FIXED_FILE;
93
94 return d;
95}
96
97static void queue_accept_multishot(struct io_uring *ring, int fd,
98 int idx, bool fixed)

Callers 1

test_loopFunction · 0.85

Calls 2

t_mallocFunction · 0.85
io_uring_get_sqeFunction · 0.50

Tested by 1

test_loopFunction · 0.68