syncdbg.h
1.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
#ifndef _SYNCDBG_HEADER_
#define _SYNCDBG_HEADER_
#define DEBUG_SYNC 1
#ifndef DEBUG_SYNC
#define myEnterCriticalSection EnterCriticalSection
#define myLeaveCriticalSection LeaveCriticalSection
#define myWaitForSingleObject WaitForSingleObject
#define myWaitForMultipleObjects WaitforMultipleObjects
#else
/* Workaround VS 6.0 debugger problem
- stack trace can't show the caller of system calls
*/
static void myEnterCriticalSection(
LPCRITICAL_SECTION lpCriticalSection
)
{
EnterCriticalSection(lpCriticalSection);
return;
}
static void myLeaveCriticalSection(
LPCRITICAL_SECTION lpCriticalSection
)
{
LeaveCriticalSection(lpCriticalSection);
return;
}
static DWORD myWaitForSingleObject(
HANDLE hHandle,
DWORD dwMilliseconds
)
{
return WaitForSingleObject(hHandle, dwMilliseconds);
}
static DWORD myWaitForMultipleObjects(
DWORD nCount,
const HANDLE* lpHandles,
BOOL bWaitAll,
DWORD dwMilliseconds
)
{
return WaitForMultipleObjects(nCount, lpHandles, bWaitAll, dwMilliseconds);
}
#endif
#endif