#pragma once //forward ref class Lock; class ILockable { friend Lock; public: ILockable(); int InitCritSection(); void FreeCriticalSection(); private: #ifdef OS_NT CRITICAL_SECTION CriticalSection; #endif int CriticalSectionInitialized; #ifdef _DEBUG // doubly linked list of active locks for debugging deadlocks Lock* pFirstLockDebugData; Lock* pLastLockDebugData; #endif int activeLockCount; }; class Lock { public: #ifdef _DEBUG Lock(ILockable* it, char *_file, int _line); #else Lock(ILockable* it); #endif virtual ~Lock(void); private: ILockable* It; #ifdef _DEBUG char *file; int line; // doubly linked list Lock* pNextLockDebugData; Lock* pPrevLockDebugData; #endif }; #ifdef _DEBUG #define LOCK(it) Lock __LOCK_IT__(it, __FILE__, __LINE__) #else #define LOCK(it) Lock __LOCK_IT__(it) #endif
# | Change | User | Description | Committed | |
---|---|---|---|---|---|
#1 | 12428 | YourUncleBob |
Populate -o //guest/perforce_software/p4connect/src/P4Bridge/... //guest/YourUncleBob/p4connect/src/P4Bridge/.... |
||
//guest/perforce_software/p4connect/src/P4Bridge/p4bridge/Lock.h | |||||
#2 | 12135 | Norman Morse |
Integrate dev branch changes into main. This code is the basiis of the 2.7 BETA release which provides Unity 5 compatibility |
||
#1 | 10940 | Norman Morse |
Inital Workshop release of P4Connect. Released under BSD-2 license |