According to POSIX, the mutex must be locked by the thread calling the signal functions to ensure predictable scheduling behavior. Found the issue using Helgrind which gave the warning `dubious: associated lock is not held by any thread`.