#pragma once
//forward ref
class Lock;
class ILockable
{
friend Lock;
public:
ILockable();
int InitCritSection();
void FreeCriticalSection();
private:
CRITICAL_SECTION CriticalSection;
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
|
26286 |
Joel Van Eenwyk |
"Forking branch Main of perforce-software-p4api-net to joel_van_eenwyk-p4api-net." |
|
|
//guest/perforce_software/p4api-net/main/p4bridge/Lock.h |
#1
|
19043 |
Liz Lam |
Rename p4api.net to p4api-net |
|
|
//guest/perforce_software/p4api.net/main/p4bridge/Lock.h |
#1
|
19042 |
Liz Lam |
Rename/move file(s) to proper main branch. |
|
|
//guest/perforce_software/p4api.net/p4bridge/Lock.h |
#2
|
8964 |
Bill |
fix line endings |
|
|
#1
|
8873 |
Matt Attaway |
Initial add of the P4API.NET source code |
|
|