The Locker class now uses ASSERT() to be sure the semaphore could be locked.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2049 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -11,6 +11,7 @@
|
|||||||
|
|
||||||
#include <KernelExport.h>
|
#include <KernelExport.h>
|
||||||
#include "Utility.h"
|
#include "Utility.h"
|
||||||
|
#include "Debug.h"
|
||||||
|
|
||||||
|
|
||||||
// Configure here if and when real benaphores should be used
|
// Configure here if and when real benaphores should be used
|
||||||
@@ -92,8 +93,9 @@ class Locker {
|
|||||||
: fLock(lock)
|
: fLock(lock)
|
||||||
{
|
{
|
||||||
fStatus = lock.Lock();
|
fStatus = lock.Lock();
|
||||||
|
ASSERT(fStatus == B_OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
~Locker()
|
~Locker()
|
||||||
{
|
{
|
||||||
if (fStatus == B_OK)
|
if (fStatus == B_OK)
|
||||||
|
|||||||
Reference in New Issue
Block a user