io: use io_uring for all io
There should no longer be any - read - write - connect - sendmsg - recvmsg - accept calls in the codebase. Previously we were using a mix of io_uring and these calls which had some negative effects: Since we were using the old system calls, we had to set the file descriptors to non-blocking. But our io_uring code did not handle EAGAIN. This lead to programs sometimes being killed when the wayland IO was actually blocking. Now all file descriptors are set to blocking, but io_uring makes it non-blocking from our perspective. The one exception are evdev files because they are read via libinput and libinput uses the old system calls.
This commit is contained in:
parent
2db0ee8995
commit
9812a02f87
55 changed files with 900 additions and 672 deletions
|
|
@ -40,16 +40,15 @@ impl TestRun {
|
|||
}
|
||||
|
||||
async fn create_client2(self: &Rc<Self>) -> Result<Rc<TestClient>, TestError> {
|
||||
let socket = uapi::socket(
|
||||
c::AF_UNIX,
|
||||
c::SOCK_STREAM | c::SOCK_CLOEXEC | c::SOCK_NONBLOCK,
|
||||
0,
|
||||
)
|
||||
.to_os_error()
|
||||
.with_context(|| "Could not create a unix socket")?;
|
||||
let socket = Rc::new(socket);
|
||||
uapi::connect(socket.raw(), &self.server_addr)
|
||||
let socket = uapi::socket(c::AF_UNIX, c::SOCK_STREAM | c::SOCK_CLOEXEC, 0)
|
||||
.to_os_error()
|
||||
.with_context(|| "Could not create a unix socket")?;
|
||||
let socket = Rc::new(socket);
|
||||
self.backend
|
||||
.state
|
||||
.ring
|
||||
.connect(&socket, &self.server_addr)
|
||||
.await
|
||||
.with_context(|| "Could not connect to the compositor")?;
|
||||
let mut obj_ids = Bitfield::default();
|
||||
obj_ids.take(0);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue