liburing icon indicating copy to clipboard operation
liburing copied to clipboard

Are read, write, recv, and send functions not expected to return EINTR?

Open sxstd001 opened this issue 1 year ago • 0 comments

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;
		}

sxstd001 avatar Jan 29 '24 11:01 sxstd001