Fastest synchronization options


I’m working on a MIDI controller using ESP32s3, consisting of a couple of buttons, switches, knobs and 25 hittable pads. During certain events I need to read from an ADC via a multiplexer. The reading itself will take roughly 300us, and I wanted to use an Rtos mutex to make sure only one of the peripherals is being read at a time, but I noticed that waiting for a mutex using xSemaphoreTake can take up to 5ms. Are there other, faster, synchronization options available under RTOS?

Thank you in advance.

The 5 ms delay is not caused by using a semaphore. There must be an issue somewhere else. Could you share the related code ?
However, the fastest and leanest way to signal events etc. are

Also protecting access to all peripherals with a single mutex is too restrictive and could cause unnecessary delays.
A protection is needed when accessing a shared resource like a (single) UART controller from multiple tasks and an other task (exclusively) accessing e.g. an I2C controller or just a different UART shouldn’t be blocked doing so.

A semaphore take should only take 5ms if it had to block on the semaphore/mutex being busy. As Hartmut says, you should have a mutex protecting just those things that need to be mutually exclusive.