Qualcomm interview question

Semaphore implementation in c++ Threading concepts