Check out my first novel, midnight's simulacra!

FreeRTOS

From dankwiki

FreeRTOS is an open source real time operating system commonly used in embedded development.

Task notifications

Rather than using semaphores for wakeup, task notifications are faster and less heavyweight.

Mutexes

FreeRTOS mutexes are a special class of semaphores. Note that they cannot be taken in interrupt handlers (i.e. xSemaphoreTakeFromISR() should only be used on semaphores created using xSemaphoreCreateBinary()). Using xSemaphoreTakeFromISR() on a mutex-type semaphore will generally fail if the lock is already held. Relative to a binary semaphore, mutexes have a priority inheritance mechanism.