pub struct KillDropTable {
ptr: [[AtomicUsize; 32]; 16],
drop_fn: [[AtomicUsize; 32]; 16],
seq: [[AtomicU32; 32]; 16],
next_seq: [AtomicU32; 16],
}Expand description
欄の表。window_mgr に 1 個だけ置く。
Fields§
§ptr: [[AtomicUsize; 32]; 16]箱の番地(0 は空き)。
drop_fn: [[AtomicUsize; 32]; 16]箱を解放する関数(unsafe fn(*mut u8) を数にした物)。
seq: [[AtomicU32; 32]; 16]作った順の番号(解放は大きい方から)。
next_seq: [AtomicU32; 16]行ごとの次の番号。
Implementations§
Source§impl KillDropTable
impl KillDropTable
pub const fn new() -> Self
Sourcefn register(&self, row: usize, p: usize, f: unsafe fn(*mut u8)) -> Option<usize>
fn register(&self, row: usize, p: usize, f: unsafe fn(*mut u8)) -> Option<usize>
行 row の空き欄に箱 p を書く。書いた欄の番号を返す(行が無い・欄が埋まっていれば None)。
Sourcefn release(&self, row: usize, e: usize, p: usize) -> bool
fn release(&self, row: usize, e: usize, p: usize) -> bool
欄 (row, e) が箱 p を持っていれば空けて true(呼び出し元が箱を解放する)。
既に空いている(止めるときに解放済み)なら false。
Sourcepub fn reset_row(&self, row: usize)
pub fn reset_row(&self, row: usize)
行 row の欄を、解放せずに全部空ける(新しいアプリのスレッドが行を使い始めるとき。前の持ち主の
消し忘れの欄を、後で誤って解放しないため)。
Sourcepub fn live_in_row(&self, row: usize) -> usize
pub fn live_in_row(&self, row: usize) -> usize
行 row の使っている欄の数。
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for KillDropTable
impl RefUnwindSafe for KillDropTable
impl Send for KillDropTable
impl Sync for KillDropTable
impl Unpin for KillDropTable
impl UnsafeUnpin for KillDropTable
impl UnwindSafe for KillDropTable
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more