Apple Interview Question

How do you implement a mutex in OS?