1
0
Fork 0
forked from wry/wry

shm: close client buffers in the cpu worker

This commit is contained in:
Julian Orth 2024-09-07 22:54:36 +02:00
parent d40e605f66
commit ece56d91d3
7 changed files with 79 additions and 16 deletions

View file

@ -34,7 +34,13 @@ impl WlShmPool {
Ok(Self {
id,
client: client.clone(),
mem: CloneCell::new(Rc::new(ClientMem::new(&fd, len, false, Some(client))?)),
mem: CloneCell::new(Rc::new(ClientMem::new(
&fd,
len,
false,
Some(client),
Some(&client.state.cpu_worker),
)?)),
fd,
tracker: Default::default(),
version,
@ -86,6 +92,7 @@ impl WlShmPoolRequestHandler for WlShmPool {
req.size as usize,
false,
Some(&self.client),
Some(&self.client.state.cpu_worker),
)?));
Ok(())
}