libroot: Downgrade lock assertion into a syslog print.

It seems there has been a bug lurking for years that this exposed.
Rather than inconvenience users further, as it's not especially
hard to trigger, let's down-grade it into a message until it can
be properly investigated and fixed.

Related to #18451.
This commit is contained in:
Augustin Cavalier 2023-06-29 21:26:07 -04:00
parent 30fda09a95
commit a41f112b07

View File

@ -90,6 +90,12 @@ __mutex_unlock(mutex *lock)
_kern_mutex_unblock(&lock->lock, 0);
}
if ((oldValue & B_USER_MUTEX_LOCKED) == 0)
if ((oldValue & B_USER_MUTEX_LOCKED) == 0) {
#if 0
debugger("mutex was not actually locked!");
#else
// The above happens too often at present (see bug #18451).
_kern_debug_output("libroot __mutex_unlock: mutex was not actually locked!\n");
#endif
}
}