rwlocks

Simple read-write locks implementation.