Apple interview question

Implement a mutex in C++