+
+ // <rdar://problem/22244050> If any of the wakeups failed because they already
+ // returned to userspace because of a signal then we need to ensure that the
+ // reset state is not cleared when that thread returns. Otherwise,
+ // _pthread_rwlock_lock will clear the interrupted state before it is read.
+ if (clearedkflags != 0 && kwq->kw_pre_intrcount > 0) {
+ kwq->kw_kflags |= KSYN_KWF_INITCLEARED;
+ }