Refactor tests && annotate rwlock and rwsem