liburing
liburing copied to clipboard
Are read, write, recv, and send functions not expected to return EINTR?
Are read, write, recv, and send functions not expected to return EINTR? Because uring is non-blocking;
This code is right? only ERR_AGAIN try again;
async<int> writeAll(const void *buf, u32 count){
again:
auto ret = co_await event::prepSend(fd, buf, count, 0); // call: io_uring_prep_send
if(ret >= 0) {
assert(ret == count || ret == 0);
co_return ret;
}
if(ret == -ERR_AGAIN )goto again;
co_return ret;
}