mirror of
https://github.com/reactos/reactos.git
synced 2024-12-29 10:35:28 +00:00
71 lines
1.7 KiB
C
71 lines
1.7 KiB
C
////////////////////////////////////////////////////////////////////
|
|
// Copyright (C) Alexander Telyatnikov, Ivan Keliukh, Yegor Anchishkin, SKIF Software, 1999-2013. Kiev, Ukraine
|
|
// All rights reserved
|
|
// This file was released under the GPLv2 on June 2015.
|
|
////////////////////////////////////////////////////////////////////
|
|
/*
|
|
|
|
Module Name:
|
|
|
|
DLDetect.h
|
|
|
|
Abstract:
|
|
|
|
This file contains all defines and protos related to DeadLock Detector.
|
|
|
|
Environment:
|
|
|
|
NT Kernel Mode
|
|
*/
|
|
|
|
#ifndef _DL_DETECT_H_
|
|
#define _DL_DETECT_H_
|
|
|
|
|
|
#define DLDAllocatePool(size) MyAllocatePool__(NonPagedPool,size)
|
|
#define DLDFreePool(addr) MyFreePool__((addr))
|
|
|
|
#define DLDGetCurrentResourceThread() \
|
|
((ERESOURCE_THREAD)PsGetCurrentThread())
|
|
|
|
#ifndef ResourceOwnedExclusive
|
|
#define ResourceOwnedExclusive 0x80
|
|
#endif
|
|
#define ResourceDisableBoost 0x08
|
|
|
|
|
|
VOID DLDInit(ULONG MaxThrdCount);
|
|
|
|
|
|
VOID DLDAcquireExclusive(PERESOURCE Resource,
|
|
ULONG BugCheckId,
|
|
ULONG Line);
|
|
|
|
VOID DLDAcquireShared(PERESOURCE Resource,
|
|
ULONG BugCheckId,
|
|
ULONG Line,
|
|
BOOLEAN WaitForExclusive);
|
|
|
|
VOID DLDAcquireSharedStarveExclusive(PERESOURCE Resource,
|
|
ULONG BugCheckId,
|
|
ULONG Line);
|
|
|
|
VOID DLDUnblock(PERESOURCE Resource);
|
|
|
|
|
|
VOID DLDFree(VOID);
|
|
|
|
typedef struct _THREAD_STRUCT {
|
|
ERESOURCE_THREAD ThreadId;
|
|
PERESOURCE WaitingResource;
|
|
ULONG BugCheckId;
|
|
ULONG Line;
|
|
} THREAD_STRUCT, *PTHREAD_STRUCT;
|
|
|
|
|
|
typedef struct _THREAD_REC_BLOCK {
|
|
PTHREAD_STRUCT Thread;
|
|
PERESOURCE HoldingResource;
|
|
} THREAD_REC_BLOCK, *PTHREAD_REC_BLOCK;
|
|
|
|
#endif // _DL_DETECT_H_
|