Added support_kit_config.h configuration header. ATM it only contains a
setting to force BLockers to be semaphore style. This may help with debugging deadlocks. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25096 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -0,0 +1,8 @@
|
|||||||
|
#ifndef SUPPORT_KIT_CONFIG_H
|
||||||
|
#define SUPPORT_KIT_CONFIG_H
|
||||||
|
|
||||||
|
|
||||||
|
#define BLOCKER_ALWAYS_SEMAPHORE_STYLE 0
|
||||||
|
|
||||||
|
|
||||||
|
#endif // SUPPORT_KIT_CONFIG_H
|
||||||
@@ -12,6 +12,7 @@
|
|||||||
#include <Locker.h>
|
#include <Locker.h>
|
||||||
#include <SupportDefs.h>
|
#include <SupportDefs.h>
|
||||||
|
|
||||||
|
#include "support_kit_config.h"
|
||||||
|
|
||||||
//
|
//
|
||||||
// Data Member Documentation:
|
// Data Member Documentation:
|
||||||
@@ -188,7 +189,7 @@ BLocker::InitLocker(const char *name, bool benaphore)
|
|||||||
if (name == NULL)
|
if (name == NULL)
|
||||||
name = "some BLocker";
|
name = "some BLocker";
|
||||||
|
|
||||||
if (benaphore) {
|
if (benaphore && !BLOCKER_ALWAYS_SEMAPHORE_STYLE) {
|
||||||
// Because this is a benaphore, initialize the benaphore count and
|
// Because this is a benaphore, initialize the benaphore count and
|
||||||
// create the semaphore. Because this is a benaphore, the semaphore
|
// create the semaphore. Because this is a benaphore, the semaphore
|
||||||
// count starts at 0 (ie acquired).
|
// count starts at 0 (ie acquired).
|
||||||
|
|||||||
Reference in New Issue
Block a user