1
0
Fork 0
forked from wry/wry

wayland: implement jay-tray-v1

This commit is contained in:
Julian Orth 2024-10-17 16:05:19 +02:00
parent 18bddbc987
commit 8c3cd97ae3
28 changed files with 979 additions and 43 deletions

View file

@ -49,6 +49,16 @@ impl<T> NumCell<T> {
res
}
#[inline(always)]
pub fn add_fetch(&self, n: T) -> T
where
T: Copy + Add<T, Output = T>,
{
let res = self.t.get() + n;
self.t.set(res);
res
}
#[inline(always)]
pub fn fetch_sub(&self, n: T) -> T
where