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:
@@ -112,9 +112,11 @@ void
|
|||||||
BLocker::Unlock()
|
BLocker::Unlock()
|
||||||
{
|
{
|
||||||
// The Be Book explicitly allows any thread, not just the lock owner, to
|
// 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())
|
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
|
// Decrement the number of outstanding locks this thread holds
|
||||||
// on this BLocker.
|
// on this BLocker.
|
||||||
|
|||||||
Reference in New Issue
Block a user