Apple Interview Question

Implement a mutex in C++