Sets up a mutex. It is recursive: the thread that holds it can lock it again, and has to unlock it as many times.
- desired_name: a label for the mutex. Only kept in builds with
DEBUGset. - desired_order: a rank for the mutex. Only kept in builds with
DEBUGset; nothing acts on it yet. -1 for none.
init :: (m: *Mutex, desired_name := "", desired_order: Mutex_Order = -1)
Sets up a mutex. It is recursive: the thread that holds it can lock it again, and has to unlock it as many times.
Parameters
- m: *Mutex
- desired_name := ""
- a label for the mutex. Only kept in builds with
DEBUGset. - desired_order: Mutex_Order
- a rank for the mutex. Only kept in builds with
DEBUGset; nothing acts on it yet. -1 for none.
init :: (cv: *Condition_Variable, desired_name := "")
Sets up a condition variable.
Parameters
- cv: *Condition_Variable
- desired_name := ""
- a label for the condition variable. Only kept in builds with
DEBUGset.
init :: (s: *Semaphore, initial_value: s32 = 0)
Sets up a semaphore.
Parameters
- s: *Semaphore
- initial_value: s32
- how many
wait_forcalls succeed before anyone callssignal.