Meta interview question

Implement a read/write lock, given a mutex that has lock() and trylock() interface