wayland: implement jay-tray-v1
This commit is contained in:
parent
18bddbc987
commit
8c3cd97ae3
28 changed files with 979 additions and 43 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue