I would have expected cqe.res to be, for example, -errno on error. But it's very clearly documented as being only -1, so, that seems to leave nowhere for the errno to be retrieved?
-
-
Show this threadThanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
If you're using liburing then the return code for the function call is the error code. ie: int ret = io_uring_wait_cqe_timeout(ring, &cqe, &timeout); The var "ret" can be printed with strerror to get the string of the error.
-
No, I mean the IO ops, not the io_uring calls. Like if you issue a read, and the read fails.
- Show replies
New conversation -
-
-
"res[...] For a successful operation, it will contain the number of bytes transferred. If a failure occurred, it will contain the negative error value." https://kernel.dk/io_uring.pdf
-
That is totally different than the man pages - but hopefully that is actually correct? The man pages say:pic.twitter.com/sgB0qkfVHT
- Show replies
New conversation -
-
-
Where are you seeing it documented like that? syscalls do syscall things, so that's -1/errno. liburing turns that into return codes directly. For a cqe, ->res is -errno or return code.
-
It is documented in many places as -1. First, in the man pages, the documentation for the res value says:pic.twitter.com/NLv3csRQ1p
- Show replies
New conversation -
-
Show additional replies, including those that may contain offensive content
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.