rewrite ReadWriteLock to use the solution of the third readers-writers problem