1
0
Fork 0
forked from wry/wry

Merge pull request #197 from mahkoh/jorth/layer-shell

Implement remaining layer shell features
This commit is contained in:
mahkoh 2024-05-09 12:14:22 +02:00 committed by GitHub
commit 3c61dd5fd4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
45 changed files with 857 additions and 402 deletions

View file

@ -5,6 +5,7 @@ use {
clonecell::{CloneCell, UnsafeCellCloneSafe},
copyhashmap::CopyHashMap,
errorfmt::ErrorFmt,
hash_map_ext::HashMapExt,
linkedlist::{LinkedList, LinkedNode},
oserror::OsError,
},
@ -230,7 +231,7 @@ impl Drop for SyncObjCtx {
fn drop(&mut self) {
self.inner.links.clear();
let mut map = self.inner.handles.lock();
for (_, handle) in map.drain() {
for handle in map.drain_values() {
destroy(&self.inner.drm, handle);
}
}

View file

@ -4,7 +4,7 @@ use {
io_uring::IoUring,
utils::{
asyncevent::AsyncEvent, buf::Buf, clonecell::CloneCell, copyhashmap::CopyHashMap,
numcell::NumCell, oserror::OsError, stack::Stack,
hash_map_ext::HashMapExt, numcell::NumCell, oserror::OsError, stack::Stack,
},
video::drm::{
sync_obj::{SyncObj, SyncObjCtx, SyncObjPoint},
@ -89,7 +89,7 @@ impl WaitForSyncObj {
pub fn set_ctx(&self, ctx: Option<Rc<SyncObjCtx>>) {
self.inner.ctx.set(ctx);
let busy_waiters: Vec<_> = self.inner.busy.lock().drain().map(|(_, w)| w).collect();
let busy_waiters: Vec<_> = self.inner.busy.lock().drain_values().collect();
for waiter in busy_waiters {
let res = self.submit_job(
waiter.job.id,