Minor cleanup.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21641 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -141,8 +141,10 @@ mutex_lock(mutex *mutex)
|
|||||||
if (status < B_OK)
|
if (status < B_OK)
|
||||||
return status;
|
return status;
|
||||||
|
|
||||||
if (me == mutex->holder)
|
if (me == mutex->holder) {
|
||||||
panic("mutex_lock failure: mutex %p (sem = 0x%lx) acquired twice by thread 0x%lx\n", mutex, mutex->sem, me);
|
panic("mutex_lock failure: mutex %p (sem = 0x%lx) acquired twice by"
|
||||||
|
" thread 0x%lx\n", mutex, mutex->sem, me);
|
||||||
|
}
|
||||||
|
|
||||||
mutex->holder = me;
|
mutex->holder = me;
|
||||||
return B_OK;
|
return B_OK;
|
||||||
@@ -158,8 +160,8 @@ mutex_unlock(mutex *mutex)
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
if (me != mutex->holder) {
|
if (me != mutex->holder) {
|
||||||
panic("mutex_unlock failure: thread 0x%lx is trying to release mutex %p (current holder 0x%lx)\n",
|
panic("mutex_unlock failure: thread 0x%lx is trying to release mutex %p"
|
||||||
me, mutex, mutex->holder);
|
" (current holder 0x%lx)\n", me, mutex, mutex->holder);
|
||||||
}
|
}
|
||||||
|
|
||||||
mutex->holder = -1;
|
mutex->holder = -1;
|
||||||
|
|||||||
Reference in New Issue
Block a user