Modules / Standard library
std/mutex_linux
A native POSIX mutex. Keep the record at one address while open; stop and join users before closing it. The storage covers the supported pthread ABIs.
Stable Needs: Native Linux. Shipped in release v0.4.2.
Import with #import "std/mutex_linux".
Mutex :: struct { storage: [8]u64; opened: bool; }
Address :: (mutex: *Mutex) -> *void
Open :: (mutex: *Mutex) -> bool
Close :: (mutex: *Mutex) -> bool
Lock :: (mutex: *Mutex) -> bool
Unlock :: (mutex: *Mutex) -> bool
Source ↗ · All modules