Refactor tests && annotate rwlock and rwsem

Done.