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

Function __encode_userdata

examples/proxy.h:33–43  ·  view source on GitHub ↗

* Packs the information that we will need at completion time into the * sqe->user_data field, which is passed back in the completion in * cqe->user_data. Some apps would need more space than this, and in fact * I'd love to pack the requested IO size in here, and it's not uncommon to * see apps use this field as just a cookie to either index a data structure * at completion time, or even just

Source from the content-addressed store, hash-verified

31 * structure into this field.
32 */
33static inline void __encode_userdata(struct io_uring_sqe *sqe, int tid, int op,
34 int bid, int fd)
35{
36 struct userdata ud = {
37 .op_tid = (op << OP_SHIFT) | tid,
38 .bid = bid,
39 .fd = fd
40 };
41
42 io_uring_sqe_set_data64(sqe, ud.val);
43}
44
45static inline uint64_t __raw_encode(int tid, int op, int bid, int fd)
46{

Callers 2

encode_userdataFunction · 0.85
parent_loopFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected