Add support for readWriteLocks. Reads are re-entrant but not writes.
Merge remote-tracking branch 'origin/master'