The
OSAL provides synchronization services
by using event flags for signaling between threads and by protecting
access to shared resources through the use of mutexes and semaphores.
A mutex provides binary mutual exclusion, whereas
a semaphore provides access by a limited number of threads.