BLocker: make "unlock from wrong thread" only a warning.

Calling Debugger here causes issues with some software (mainly Mesa).
Only print a warning, this is enough for developers to see the problem,
and not as annoying for users.
This commit is contained in:
Adrien Destugues
2015-04-28 20:33:45 +02:00
parent 52664df718
commit 5de22b9bf6
+4 -2
View File
@@ -112,9 +112,11 @@ void
BLocker::Unlock()
{
// The Be Book explicitly allows any thread, not just the lock owner, to
// unlock. This is bad practice and Haiku should not allow it.
// unlock. This is bad practice, but we must allow it for compatibility
// reasons. We can at least warn the developer that something is probably
// wrong.
if (!IsLocked())
debugger("Trying to unlock from the wrong thread (#6400)");
fprintf(stderr, "Trying to unlock from the wrong thread (#6400)");
// Decrement the number of outstanding locks this thread holds
// on this BLocker.