ReactOS  0.4.14-dev-556-g4c5b21f
dldetect.h
Go to the documentation of this file.
1 // Copyright (C) Alexander Telyatnikov, Ivan Keliukh, Yegor Anchishkin, SKIF Software, 1999-2013. Kiev, Ukraine
3 // All rights reserved
4 // This file was released under the GPLv2 on June 2015.
6 /*
7 
8 Module Name:
9 
10  DLDetect.h
11 
12 Abstract:
13 
14  This file contains all defines and protos related to DeadLock Detector.
15 
16 Environment:
17 
18  NT Kernel Mode
19 */
20 
21 #ifndef _DL_DETECT_H_
22 #define _DL_DETECT_H_
23 
24 
25 #define DLDAllocatePool(size) MyAllocatePool__(NonPagedPool,size)
26 #define DLDFreePool(addr) MyFreePool__((addr))
27 
28 #define DLDGetCurrentResourceThread() \
29  ((ERESOURCE_THREAD)PsGetCurrentThread())
30 
31 #ifndef ResourceOwnedExclusive
32 #define ResourceOwnedExclusive 0x80
33 #endif
34 #define ResourceDisableBoost 0x08
35 
36 
37 VOID DLDInit(ULONG MaxThrdCount);
38 
39 
41  ULONG BugCheckId,
42  ULONG Line);
43 
45  ULONG BugCheckId,
46  ULONG Line,
47  BOOLEAN WaitForExclusive);
48 
50  ULONG BugCheckId,
51  ULONG Line);
52 
54 
55 
57 
58 typedef struct _THREAD_STRUCT {
64 
65 
66 typedef struct _THREAD_REC_BLOCK {
70 
71 #endif // _DL_DETECT_H_
ULONG_PTR ERESOURCE_THREAD
Definition: extypes.h:208
struct _THREAD_REC_BLOCK THREAD_REC_BLOCK
PERESOURCE WaitingResource
Definition: dldetect.h:60
ERESOURCE_THREAD ThreadId
Definition: dldetect.h:59
ULONG Line
Definition: dldetect.h:62
ERESOURCE * PERESOURCE
Definition: env_spec_w32.h:595
VOID DLDUnblock(PERESOURCE Resource)
_Acquires_exclusive_lock_ Resource _Acquires_shared_lock_ Resource _Inout_ PERESOURCE Resource
Definition: cdprocs.h:848
unsigned char BOOLEAN
PTHREAD_STRUCT Thread
Definition: dldetect.h:67
struct _THREAD_STRUCT THREAD_STRUCT
Definition: ncftp.h:79
VOID DLDAcquireSharedStarveExclusive(PERESOURCE Resource, ULONG BugCheckId, ULONG Line)
VOID DLDInit(ULONG MaxThrdCount)
Initialize deadlock detector.
Definition: dldetect.cpp:51
struct _THREAD_REC_BLOCK * PTHREAD_REC_BLOCK
unsigned int ULONG
Definition: retypes.h:1
struct _THREAD_STRUCT * PTHREAD_STRUCT
PERESOURCE HoldingResource
Definition: dldetect.h:68
VOID DLDAcquireExclusive(PERESOURCE Resource, ULONG BugCheckId, ULONG Line)
Definition: dldetect.cpp:313
ULONG BugCheckId
Definition: dldetect.h:61
VOID DLDAcquireShared(PERESOURCE Resource, ULONG BugCheckId, ULONG Line, BOOLEAN WaitForExclusive)
Definition: dldetect.cpp:398
VOID DLDFree(VOID)
Definition: dldetect.cpp:64