Mutexes, Semaphores, etc. are provided by the operating system as a means of synchronization. Their behavior is handled by the operating system.
Normally, on windows/freeRTOS, the scheduler will not context switch into a thread that is waiting on a synchronization object.
See here for windows https://docs.microsoft.com/en-us/windows/desktop/procthread/context-switches