Add support for readWriteLocks. Reads are re-entrant but not writes.