Apple Interview Question

How to implement a mutex in assembly