MobileIron interview question

Implement ReadWriteLock from scratch code to handle all the usecases