Revert "Major changes to RWSEM algorithm"

This reverts commit cc27816bba7046e2db4398b0ef7378bf4509eac3.