efficient rw-lock using interlocked access