Have lockstat:::sx-release fire only after the lock state has changed.

MFC after:	1 week
This commit is contained in:
Mark Johnston 2017-11-24 19:04:31 +00:00
parent 26d94f99af
commit dbe4541db2

View file

@ -1180,8 +1180,6 @@ _sx_sunlock_hard(struct sx *sx, uintptr_t x LOCK_FILE_LINE_ARG_DEF)
if (SCHEDULER_STOPPED())
return;
LOCKSTAT_PROFILE_RELEASE_RWLOCK(sx__release, sx, LOCKSTAT_READER);
for (;;) {
if (_sx_sunlock_try(sx, &x))
break;
@ -1217,6 +1215,7 @@ _sx_sunlock_hard(struct sx *sx, uintptr_t x LOCK_FILE_LINE_ARG_DEF)
kick_proc0();
break;
}
LOCKSTAT_PROFILE_RELEASE_RWLOCK(sx__release, sx, LOCKSTAT_READER);
}
void