const ORDER_RELAXED
pub const ORDER_RELAXED = 0Purpose
Memory ordering constants for barriers and explicit atomic operations
#core/syncStandard library package `#core/sync`.
const ORDER_RELAXEDpub const ORDER_RELAXED = 0Memory ordering constants for barriers and explicit atomic operations
const ORDER_ACQUIREpub const ORDER_ACQUIRE = 1Constant ORDER_ACQUIRE, defining protocol or algorithm parameters.
const ORDER_RELEASEpub const ORDER_RELEASE = 2Constant ORDER_RELEASE, defining protocol or algorithm parameters.
const ORDER_ACQ_RELpub const ORDER_ACQ_REL = 3Constant ORDER_ACQ_REL, defining protocol or algorithm parameters.
const ORDER_SEQ_CSTpub const ORDER_SEQ_CST = 4Constant ORDER_SEQ_CST, defining protocol or algorithm parameters.
const ONCE_UNINITpub const ONCE_UNINIT = 0Constant ONCE_UNINIT, defining protocol or algorithm parameters.
const ONCE_RUNNINGpub const ONCE_RUNNING = 1Constant ONCE_RUNNING, defining protocol or algorithm parameters.
const ONCE_DONEpub const ONCE_DONE = 2Constant ONCE_DONE, defining protocol or algorithm parameters.
compiler_fencepub fn compiler_fence()Compiler fence.
No arguments are required.
This call does not return a value.
fencepub fn fence(order int)Execute fence.
order intThis call does not return a value.
struct Spinlockpub struct Spinlock {
}Spinlock context or state structure.
This type has no public fields.
spinlock_newpub fn spinlock_new() SpinlockSpinlock new.
No arguments are required.
Spinlock — a value of this type
($&Spinlock) try_lockpub fn (s $&Spinlock) try_lock() boolOperation on $&Spinlock: try lock.
s $&SpinlockSpinlock instance used by this call (exclusive borrow).bool — true or false
($&Spinlock) lockpub fn (s $&Spinlock) lock()Operation on $&Spinlock: acquire the lock.
s $&SpinlockSpinlock instance used by this call (exclusive borrow).This call does not return a value.
($&Spinlock) unlockpub fn (s $&Spinlock) unlock()Operation on $&Spinlock: release the lock.
s $&SpinlockSpinlock instance used by this call (exclusive borrow).This call does not return a value.
struct SpinGuardpub struct SpinGuard {
pub lock *raw Spinlock
}Structure encapsulating lock.
lock *raw Spinlock($&SpinGuard) droppub fn (g $&SpinGuard) drop()Execute drop on $&SpinGuard.
g $&SpinGuardSpinGuard instance used by this call (exclusive borrow).This call does not return a value.
($&Spinlock) acquirepub fn (s $&Spinlock) acquire() SpinGuardExecute acquire on $&Spinlock.
s $&SpinlockSpinlock instance used by this call (exclusive borrow).SpinGuard — a value of this type
struct IrqSpinlockpub struct IrqSpinlock {
pub lock Spinlock
pub depth u32
pub saved u64
}Structure encapsulating lock, depth, saved.
lock Spinlockdepth u32saved u64irq_spinlock_newpub fn irq_spinlock_new() IrqSpinlockIrq spinlock new.
No arguments are required.
IrqSpinlock — a value of this type
($&IrqSpinlock) lockpub fn (s $&IrqSpinlock) lock()Operation on $&IrqSpinlock: acquire the lock.
s $&IrqSpinlockIrqSpinlock instance used by this call (exclusive borrow).This call does not return a value.
($&IrqSpinlock) unlockpub fn (s $&IrqSpinlock) unlock()Operation on $&IrqSpinlock: release the lock.
s $&IrqSpinlockIrqSpinlock instance used by this call (exclusive borrow).This call does not return a value.
struct IrqGuardpub struct IrqGuard {
pub lock *raw IrqSpinlock
}Structure encapsulating lock.
lock *raw IrqSpinlock($&IrqGuard) droppub fn (g $&IrqGuard) drop()Execute drop on $&IrqGuard.
g $&IrqGuardIrqGuard instance used by this call (exclusive borrow).This call does not return a value.
($&IrqSpinlock) acquirepub fn (s $&IrqSpinlock) acquire() IrqGuardExecute acquire on $&IrqSpinlock.
s $&IrqSpinlockIrqSpinlock instance used by this call (exclusive borrow).IrqGuard — a value of this type
struct AtomicBoolpub struct AtomicBool {
}AtomicBool context or state structure.
This type has no public fields.
atomic_bool_newpub fn atomic_bool_new(v bool) AtomicBoolAtomic bool new.
v boolAtomicBool — a value of this type
(&AtomicBool) loadpub fn (a &AtomicBool) load() boolExecute load on &AtomicBool.
a &AtomicBoolAtomicBool instance used by this call (borrow).bool — true or false
($&AtomicBool) storepub fn (a $&AtomicBool) store(v bool)Execute store on $&AtomicBool.
a $&AtomicBoolAtomicBool instance used by this call (exclusive borrow).v boolThis call does not return a value.
($&AtomicBool) swappub fn (a $&AtomicBool) swap(v bool) boolExecute swap on $&AtomicBool.
a $&AtomicBoolAtomicBool instance used by this call (exclusive borrow).v boolbool — true or false
($&AtomicBool) compare_exchangepub fn (a $&AtomicBool) compare_exchange(expected bool, desired bool) boolOperation on $&AtomicBool: compare exchange.
a $&AtomicBoolAtomicBool instance used by this call (exclusive borrow).expected booldesired boolbool — true or false
struct AtomicU8pub struct AtomicU8 {
}AtomicU8 context or state structure.
This type has no public fields.
atomic_u8_newpub fn atomic_u8_new(v u8) AtomicU8Atomic u8 new.
v u8AtomicU8 — a value of this type
(&AtomicU8) loadpub fn (a &AtomicU8) load() u8Execute load on &AtomicU8.
a &AtomicU8AtomicU8 instance used by this call (borrow).u8 — a value of this type
($&AtomicU8) storepub fn (a $&AtomicU8) store(v u8)Execute store on $&AtomicU8.
a $&AtomicU8AtomicU8 instance used by this call (exclusive borrow).v u8This call does not return a value.
($&AtomicU8) swappub fn (a $&AtomicU8) swap(v u8) u8Execute swap on $&AtomicU8.
a $&AtomicU8AtomicU8 instance used by this call (exclusive borrow).v u8u8 — a value of this type
($&AtomicU8) compare_exchangepub fn (a $&AtomicU8) compare_exchange(expected u8, desired u8) u8Operation on $&AtomicU8: compare exchange.
a $&AtomicU8AtomicU8 instance used by this call (exclusive borrow).expected u8desired u8u8 — a value of this type
struct AtomicU16pub struct AtomicU16 {
}AtomicU16 context or state structure.
This type has no public fields.
atomic_u16_newpub fn atomic_u16_new(v u16) AtomicU16Atomic u16 new.
v u16AtomicU16 — a value of this type
(&AtomicU16) loadpub fn (a &AtomicU16) load() u16Execute load on &AtomicU16.
a &AtomicU16AtomicU16 instance used by this call (borrow).u16 — a value of this type
($&AtomicU16) storepub fn (a $&AtomicU16) store(v u16)Execute store on $&AtomicU16.
a $&AtomicU16AtomicU16 instance used by this call (exclusive borrow).v u16This call does not return a value.
($&AtomicU16) swappub fn (a $&AtomicU16) swap(v u16) u16Execute swap on $&AtomicU16.
a $&AtomicU16AtomicU16 instance used by this call (exclusive borrow).v u16u16 — a value of this type
($&AtomicU16) compare_exchangepub fn (a $&AtomicU16) compare_exchange(expected u16, desired u16) u16Operation on $&AtomicU16: compare exchange.
a $&AtomicU16AtomicU16 instance used by this call (exclusive borrow).expected u16desired u16u16 — a value of this type
struct AtomicU32pub struct AtomicU32 {
}AtomicU32 context or state structure.
This type has no public fields.
atomic_u32_newpub fn atomic_u32_new(v u32) AtomicU32Atomic u32 new.
v u32AtomicU32 — a value of this type
(&AtomicU32) loadpub fn (a &AtomicU32) load() u32Execute load on &AtomicU32.
a &AtomicU32AtomicU32 instance used by this call (borrow).u32 — a value of this type
(&AtomicU32) load_orderedpub fn (a &AtomicU32) load_ordered(order int) u32Operation on &AtomicU32: load ordered.
a &AtomicU32AtomicU32 instance used by this call (borrow).order intu32 — a value of this type
($&AtomicU32) storepub fn (a $&AtomicU32) store(v u32)Execute store on $&AtomicU32.
a $&AtomicU32AtomicU32 instance used by this call (exclusive borrow).v u32This call does not return a value.
($&AtomicU32) store_orderedpub fn (a $&AtomicU32) store_ordered(v u32, order int)Operation on $&AtomicU32: store ordered.
a $&AtomicU32AtomicU32 instance used by this call (exclusive borrow).v u32order intThis call does not return a value.
($&AtomicU32) swappub fn (a $&AtomicU32) swap(v u32) u32Execute swap on $&AtomicU32.
a $&AtomicU32AtomicU32 instance used by this call (exclusive borrow).v u32u32 — a value of this type
($&AtomicU32) compare_exchangepub fn (a $&AtomicU32) compare_exchange(expected u32, desired u32) u32Operation on $&AtomicU32: compare exchange.
a $&AtomicU32AtomicU32 instance used by this call (exclusive borrow).expected u32desired u32u32 — a value of this type
($&AtomicU32) fetch_addpub fn (a $&AtomicU32) fetch_add(delta u32) u32Operation on $&AtomicU32: fetch add.
a $&AtomicU32AtomicU32 instance used by this call (exclusive borrow).delta u32u32 — a value of this type
($&AtomicU32) fetch_subpub fn (a $&AtomicU32) fetch_sub(delta u32) u32Operation on $&AtomicU32: fetch sub.
a $&AtomicU32AtomicU32 instance used by this call (exclusive borrow).delta u32u32 — a value of this type
($&AtomicU32) fetch_andpub fn (a $&AtomicU32) fetch_and(mask u32) u32Operation on $&AtomicU32: fetch and.
a $&AtomicU32AtomicU32 instance used by this call (exclusive borrow).mask u32u32 — a value of this type
($&AtomicU32) fetch_orpub fn (a $&AtomicU32) fetch_or(mask u32) u32Operation on $&AtomicU32: fetch or.
a $&AtomicU32AtomicU32 instance used by this call (exclusive borrow).mask u32u32 — a value of this type
($&AtomicU32) fetch_xorpub fn (a $&AtomicU32) fetch_xor(mask u32) u32Operation on $&AtomicU32: fetch xor.
a $&AtomicU32AtomicU32 instance used by this call (exclusive borrow).mask u32u32 — a value of this type
struct AtomicU64pub struct AtomicU64 {
}AtomicU64 context or state structure.
This type has no public fields.
atomic_u64_newpub fn atomic_u64_new(v u64) AtomicU64Atomic u64 new.
v u64AtomicU64 — a value of this type
(&AtomicU64) loadpub fn (a &AtomicU64) load() u64Execute load on &AtomicU64.
a &AtomicU64AtomicU64 instance used by this call (borrow).u64 — a value of this type
(&AtomicU64) load_orderedpub fn (a &AtomicU64) load_ordered(order int) u64Operation on &AtomicU64: load ordered.
a &AtomicU64AtomicU64 instance used by this call (borrow).order intu64 — a value of this type
($&AtomicU64) storepub fn (a $&AtomicU64) store(v u64)Execute store on $&AtomicU64.
a $&AtomicU64AtomicU64 instance used by this call (exclusive borrow).v u64This call does not return a value.
($&AtomicU64) store_orderedpub fn (a $&AtomicU64) store_ordered(v u64, order int)Operation on $&AtomicU64: store ordered.
a $&AtomicU64AtomicU64 instance used by this call (exclusive borrow).v u64order intThis call does not return a value.
($&AtomicU64) swappub fn (a $&AtomicU64) swap(v u64) u64Execute swap on $&AtomicU64.
a $&AtomicU64AtomicU64 instance used by this call (exclusive borrow).v u64u64 — a value of this type
($&AtomicU64) compare_exchangepub fn (a $&AtomicU64) compare_exchange(expected u64, desired u64) u64Operation on $&AtomicU64: compare exchange.
a $&AtomicU64AtomicU64 instance used by this call (exclusive borrow).expected u64desired u64u64 — a value of this type
($&AtomicU64) fetch_addpub fn (a $&AtomicU64) fetch_add(delta u64) u64Operation on $&AtomicU64: fetch add.
a $&AtomicU64AtomicU64 instance used by this call (exclusive borrow).delta u64u64 — a value of this type
($&AtomicU64) fetch_subpub fn (a $&AtomicU64) fetch_sub(delta u64) u64Operation on $&AtomicU64: fetch sub.
a $&AtomicU64AtomicU64 instance used by this call (exclusive borrow).delta u64u64 — a value of this type
($&AtomicU64) fetch_andpub fn (a $&AtomicU64) fetch_and(mask u64) u64Operation on $&AtomicU64: fetch and.
a $&AtomicU64AtomicU64 instance used by this call (exclusive borrow).mask u64u64 — a value of this type
($&AtomicU64) fetch_orpub fn (a $&AtomicU64) fetch_or(mask u64) u64Operation on $&AtomicU64: fetch or.
a $&AtomicU64AtomicU64 instance used by this call (exclusive borrow).mask u64u64 — a value of this type
($&AtomicU64) fetch_xorpub fn (a $&AtomicU64) fetch_xor(mask u64) u64Operation on $&AtomicU64: fetch xor.
a $&AtomicU64AtomicU64 instance used by this call (exclusive borrow).mask u64u64 — a value of this type
struct AtomicPtrpub struct AtomicPtr {
}AtomicPtr context or state structure.
This type has no public fields.
atomic_ptr_newpub fn atomic_ptr_new(p *raw u8) AtomicPtrAtomic ptr new.
p *raw u8AtomicPtr — a value of this type
(&AtomicPtr) loadpub fn (a &AtomicPtr) load() *raw u8Execute load on &AtomicPtr.
a &AtomicPtrAtomicPtr instance used by this call (borrow).*raw u8 — a value of this type
($&AtomicPtr) storepub fn (a $&AtomicPtr) store(ptr *raw u8)Execute store on $&AtomicPtr.
a $&AtomicPtrAtomicPtr instance used by this call (exclusive borrow).ptr *raw u8This call does not return a value.
($&AtomicPtr) swappub fn (a $&AtomicPtr) swap(ptr *raw u8) *raw u8Execute swap on $&AtomicPtr.
a $&AtomicPtrAtomicPtr instance used by this call (exclusive borrow).ptr *raw u8*raw u8 — a value of this type
($&AtomicPtr) compare_exchangepub fn (a $&AtomicPtr) compare_exchange(expected *raw u8, desired *raw u8) *raw u8Operation on $&AtomicPtr: compare exchange.
a $&AtomicPtrAtomicPtr instance used by this call (exclusive borrow).expected *raw u8desired *raw u8*raw u8 — a value of this type
struct RwSpinlockpub struct RwSpinlock {
}RwSpinlock context or state structure.
This type has no public fields.
rw_spinlock_newpub fn rw_spinlock_new() RwSpinlockRw spinlock new.
No arguments are required.
RwSpinlock — a value of this type
($&RwSpinlock) read_lockpub fn (rw $&RwSpinlock) read_lock()Operation on $&RwSpinlock: acquire a shared read lock.
rw $&RwSpinlockRwSpinlock instance used by this call (exclusive borrow).This call does not return a value.
($&RwSpinlock) read_unlockpub fn (rw $&RwSpinlock) read_unlock()Operation on $&RwSpinlock: release a read lock.
rw $&RwSpinlockRwSpinlock instance used by this call (exclusive borrow).This call does not return a value.
($&RwSpinlock) write_lockpub fn (rw $&RwSpinlock) write_lock()Operation on $&RwSpinlock: acquire an exclusive write lock.
rw $&RwSpinlockRwSpinlock instance used by this call (exclusive borrow).This call does not return a value.
($&RwSpinlock) write_unlockpub fn (rw $&RwSpinlock) write_unlock()Operation on $&RwSpinlock: release a write lock.
rw $&RwSpinlockRwSpinlock instance used by this call (exclusive borrow).This call does not return a value.
struct RwReadGuardpub struct RwReadGuard {
pub lock *raw RwSpinlock
}Structure encapsulating lock.
lock *raw RwSpinlock($&RwReadGuard) droppub fn (g $&RwReadGuard) drop()Execute drop on $&RwReadGuard.
g $&RwReadGuardRwReadGuard instance used by this call (exclusive borrow).This call does not return a value.
($&RwSpinlock) readpub fn (rw $&RwSpinlock) read() RwReadGuardOperation on $&RwSpinlock: read up to max bytes.
rw $&RwSpinlockRwSpinlock instance used by this call (exclusive borrow).RwReadGuard — a value of this type
struct RwWriteGuardpub struct RwWriteGuard {
pub lock *raw RwSpinlock
}Structure encapsulating lock.
lock *raw RwSpinlock($&RwWriteGuard) droppub fn (g $&RwWriteGuard) drop()Execute drop on $&RwWriteGuard.
g $&RwWriteGuardRwWriteGuard instance used by this call (exclusive borrow).This call does not return a value.
($&RwSpinlock) writepub fn (rw $&RwSpinlock) write() RwWriteGuardOperation on $&RwSpinlock: write data and return the byte count.
rw $&RwSpinlockRwSpinlock instance used by this call (exclusive borrow).RwWriteGuard — a value of this type
struct SeqLockpub struct SeqLock {
}SeqLock context or state structure.
This type has no public fields.
seqlock_newpub fn seqlock_new() SeqLockSeqlock new.
No arguments are required.
SeqLock — a value of this type
($&SeqLock) write_beginpub fn (sl $&SeqLock) write_begin()Operation on $&SeqLock: write begin.
sl $&SeqLockSeqLock instance used by this call (exclusive borrow).This call does not return a value.
($&SeqLock) write_endpub fn (sl $&SeqLock) write_end()Operation on $&SeqLock: write end.
sl $&SeqLockSeqLock instance used by this call (exclusive borrow).This call does not return a value.
(&SeqLock) read_beginpub fn (sl &SeqLock) read_begin() u32Operation on &SeqLock: read begin.
sl &SeqLockSeqLock instance used by this call (borrow).u32 — a value of this type
(&SeqLock) read_retrypub fn (sl &SeqLock) read_retry(start u32) boolOperation on &SeqLock: read retry.
sl &SeqLockSeqLock instance used by this call (borrow).start u32bool — true or false
struct Oncepub struct Once {
}Once context or state structure.
This type has no public fields.
once_newpub fn once_new() OnceOnce new.
No arguments are required.
Once — a value of this type
(&Once) is_completedpub fn (o &Once) is_completed() boolOperation on &Once: whether it is completed.
o &OnceOnce instance used by this call (borrow).bool — true or false
($&Once) try_beginpub fn (o $&Once) try_begin() boolOperation on $&Once: try begin.
o $&OnceOnce instance used by this call (exclusive borrow).bool — true or false
($&Once) finishpub fn (o $&Once) finish()Execute finish on $&Once.
o $&OnceOnce instance used by this call (exclusive borrow).This call does not return a value.
struct TicketLockpub struct TicketLock {
}TicketLock context or state structure.
This type has no public fields.
ticket_lock_newpub fn ticket_lock_new() TicketLockTicket lock new.
No arguments are required.
TicketLock — a value of this type
($&TicketLock) lockpub fn (tl $&TicketLock) lock()Operation on $&TicketLock: acquire the lock.
tl $&TicketLockTicketLock instance used by this call (exclusive borrow).This call does not return a value.
($&TicketLock) try_lockpub fn (tl $&TicketLock) try_lock() boolOperation on $&TicketLock: try lock.
tl $&TicketLockTicketLock instance used by this call (exclusive borrow).bool — true or false
($&TicketLock) unlockpub fn (tl $&TicketLock) unlock()Operation on $&TicketLock: release the lock.
tl $&TicketLockTicketLock instance used by this call (exclusive borrow).This call does not return a value.
struct TicketGuardpub struct TicketGuard {
pub lock *raw TicketLock
}Structure encapsulating lock.
lock *raw TicketLock($&TicketGuard) droppub fn (g $&TicketGuard) drop()Execute drop on $&TicketGuard.
g $&TicketGuardTicketGuard instance used by this call (exclusive borrow).This call does not return a value.
($&TicketLock) acquirepub fn (tl $&TicketLock) acquire() TicketGuardExecute acquire on $&TicketLock.
tl $&TicketLockTicketLock instance used by this call (exclusive borrow).TicketGuard — a value of this type
struct IrqTicketLockpub struct IrqTicketLock {
}IrqTicketLock context or state structure.
This type has no public fields.
irq_ticket_lock_newpub fn irq_ticket_lock_new() IrqTicketLockIrq ticket lock new.
No arguments are required.
IrqTicketLock — a value of this type
($&IrqTicketLock) lockpub fn (tl $&IrqTicketLock) lock()Operation on $&IrqTicketLock: acquire the lock.
tl $&IrqTicketLockIrqTicketLock instance used by this call (exclusive borrow).This call does not return a value.
($&IrqTicketLock) unlockpub fn (tl $&IrqTicketLock) unlock()Operation on $&IrqTicketLock: release the lock.
tl $&IrqTicketLockIrqTicketLock instance used by this call (exclusive borrow).This call does not return a value.
struct IrqTicketGuardpub struct IrqTicketGuard {
pub lock *raw IrqTicketLock
}Structure encapsulating lock.
lock *raw IrqTicketLock($&IrqTicketGuard) droppub fn (g $&IrqTicketGuard) drop()Execute drop on $&IrqTicketGuard.
g $&IrqTicketGuardIrqTicketGuard instance used by this call (exclusive borrow).This call does not return a value.
($&IrqTicketLock) acquirepub fn (tl $&IrqTicketLock) acquire() IrqTicketGuardExecute acquire on $&IrqTicketLock.
tl $&IrqTicketLockIrqTicketLock instance used by this call (exclusive borrow).IrqTicketGuard — a value of this type
struct IrqRwSpinlockpub struct IrqRwSpinlock {
}IrqRwSpinlock context or state structure.
This type has no public fields.
irq_rw_spinlock_newpub fn irq_rw_spinlock_new() IrqRwSpinlockIrq rw spinlock new.
No arguments are required.
IrqRwSpinlock — a value of this type
struct IrqRwReadGuardpub struct IrqRwReadGuard {
pub lock *raw IrqRwSpinlock
pub saved_flags u64
}Structure encapsulating lock, saved_flags.
lock *raw IrqRwSpinlocksaved_flags u64($&IrqRwReadGuard) droppub fn (g $&IrqRwReadGuard) drop()Execute drop on $&IrqRwReadGuard.
g $&IrqRwReadGuardIrqRwReadGuard instance used by this call (exclusive borrow).This call does not return a value.
struct IrqRwWriteGuardpub struct IrqRwWriteGuard {
pub lock *raw IrqRwSpinlock
pub saved_flags u64
}Structure encapsulating lock, saved_flags.
lock *raw IrqRwSpinlocksaved_flags u64($&IrqRwWriteGuard) droppub fn (g $&IrqRwWriteGuard) drop()Execute drop on $&IrqRwWriteGuard.
g $&IrqRwWriteGuardIrqRwWriteGuard instance used by this call (exclusive borrow).This call does not return a value.
($&IrqRwSpinlock) readpub fn (rw $&IrqRwSpinlock) read() IrqRwReadGuardOperation on $&IrqRwSpinlock: read up to max bytes.
rw $&IrqRwSpinlockIrqRwSpinlock instance used by this call (exclusive borrow).IrqRwReadGuard — a value of this type
($&IrqRwSpinlock) writepub fn (rw $&IrqRwSpinlock) write() IrqRwWriteGuardOperation on $&IrqRwSpinlock: write data and return the byte count.
rw $&IrqRwSpinlockIrqRwSpinlock instance used by this call (exclusive borrow).IrqRwWriteGuard — a value of this type
struct Barrierpub struct Barrier {
pub total u32
pub arrived u32
pub sense u32
pub pad u32
}Structure encapsulating total, arrived, sense, pad.
total u32arrived u32sense u32pad u32barrier_newpub fn barrier_new(total u32) BarrierBarrier new.
total u32Barrier — a value of this type
($&Barrier) waitpub fn (b $&Barrier) wait()Execute wait on $&Barrier.
b $&BarrierBarrier instance used by this call (exclusive borrow).This call does not return a value.
($&SeqLock) write_lockpub fn (sl $&SeqLock) write_lock()Operation on $&SeqLock: acquire an exclusive write lock.
sl $&SeqLockSeqLock instance used by this call (exclusive borrow).This call does not return a value.
($&SeqLock) write_unlockpub fn (sl $&SeqLock) write_unlock()Operation on $&SeqLock: release a write lock.
sl $&SeqLockSeqLock instance used by this call (exclusive borrow).This call does not return a value.
struct Semaphorepub struct Semaphore {
pub count AtomicU64
}Structure encapsulating count.
count AtomicU64semaphore_newpub fn semaphore_new(initial u64) SemaphoreSemaphore new.
initial u64Semaphore — a value of this type
($&Semaphore) try_acquirepub fn (s $&Semaphore) try_acquire() boolOperation on $&Semaphore: try acquire.
s $&SemaphoreSemaphore instance used by this call (exclusive borrow).bool — true or false
($&Semaphore) acquirepub fn (s $&Semaphore) acquire()Execute acquire on $&Semaphore.
s $&SemaphoreSemaphore instance used by this call (exclusive borrow).This call does not return a value.
($&Semaphore) releasepub fn (s $&Semaphore) release()Execute release on $&Semaphore.
s $&SemaphoreSemaphore instance used by this call (exclusive borrow).This call does not return a value.
(&Semaphore) availablepub fn (s &Semaphore) available() u64Execute available on &Semaphore.
s &SemaphoreSemaphore instance used by this call (borrow).u64 — a value of this type