Qualcomm interview question

Difference between a mutex and a semaphore