Inherits: Reference < Object

Category: Core

Brief Description

A synchronization Mutex.

Member Functions

void lock ( )
Error try_lock ( )
void unlock ( )


A synchronization Mutex. Element used in multi-threadding. Basically a binary Semaphore. Guarantees that only one thread has this lock, can be used to protect a critical section.

Member Function Description

  • void lock ( )

Lock this Mutex, blocks until it is unlocked by the current owner.

  • Error try_lock ( )

Try locking this Mutex, does not block. Returns OK on success else ERR_BUSY.

  • void unlock ( )

Unlock this Mutex, leaving it to others threads.