TODO
API
Data Structure
Helper Thread
Because the reap API all inplement with static inline, not able to intercept them with LD_PRELOAD, consider use a helper thread to do this.
Can have a std::async helper thread to maintain the data strucutre of TMIO, the best interveal can be approach by check how many io_uring have their complemntion request not checking.
Testing
TODO
API
io_uring_prep_xxx:io_uring_submit:io_uring_submit_and_wait:io_uring_wait_cqe:io_uring_peek_cqe:Data Structure
unordered_map<struct io_uring *, struct io_uring_sqe *>(requests_to_submit): Track the requests to be submitted. Key is theio_uringobj this request belongs to, value is thestruct io_uring_sqe *of the requests that used as arguments ofio_uring_sqe_set_data.unordered_map<struct io_uring *, unordered_map<__u64, Enum::RequestQueue>>(ongoing_requests): Track the submitted requests.liburingwaiting function (e.g.io_uring_wait_cqe) is called, TMIO would mark all the prending requests for thisstruct io_uringas "required finsihed". Also would mark the request pointed bystruct io_uring_cqe **cqe_ptras finsihed (might use theio_uring_cqe_get_datafor doing this in a clever ways).liburingchecking function (e.g.io_uring_cqe_get_data) is called, TMIO would mark the related request as "actually finished".Helper Thread
Because the reap API all inplement with
static inline, not able to intercept them withLD_PRELOAD, consider use a helper thread to do this.Can have a
std::asynchelper thread to maintain the data strucutre of TMIO, the best interveal can be approach by check how manyio_uringhave their complemntion request not checking.Testing