Ashet OS

namespace: ashet.sync

System Calls

syscall create_event(out event: SyncEvent)

Creates a new SyncEvent object that can be used to synchronize different processes.

syscall notify_one(in event: SyncEvent)

Completes one WaitForEvent IOP waiting for the given event.

syscall notify_all(in event: SyncEvent)

Completes all WaitForEvent IOP waiting for the given event.

syscall create_mutex(out mutex: Mutex)

Creates a new mutual exclusion.

syscall try_lock(in mutex: Mutex, out is_locked: bool)

Tries to lock a mutex and returns if it was successful.

syscall unlock(in mutex: Mutex)

Unlocks a mutual exclusion. Completes a single Lock IOP if it exists.

Asynchronous Operations

async_call WaitForEvent(in event: SyncEvent)

Waits for the given SyncEvent to be notified.

async_call Lock(in mutex: Mutex)

Locks a mutex. Will complete once the mutex is locked.