ReactOS  0.4.15-dev-3182-g7b62228
fxverifierlock.hpp File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  FxVerifierOrderMapping
 
struct  FxVerifierThreadTableEntry
 
class  FxVerifierLock
 

Macros

#define FX_LOCK_ORDER_NONE   0x0000
 
#define FX_LOCK_ORDER_UNKNOWN   0xFFFF
 
#define FX_LOCK_ORDER_PACKAGE_PDO   0x1000
 
#define FX_LOCK_ORDER_PACKAGE_FDO   0x1000
 
#define FX_LOCK_ORDER_WMI_IRP_HANDLER   0x1000
 
#define FX_LOCK_ORDER_PACKAGE_GENERAL   0x1000
 
#define FX_LOCK_ORDER_IO_TARGET   0x1000
 
#define FX_LOCK_ORDER_WMI_PROVIDER   0x1001
 
#define FX_LOCK_ORDER_WMI_INSTANCE   0x1002
 
#define FX_LOCK_ORDER_DMA_ENABLER   0x1000
 
#define FX_LOCK_ORDER_DMA_TRANSACTION   0x1001
 
#define FX_LOCK_ORDER_COMMON_BUFFER   0x1001
 
#define FX_LOCK_ORDER_USB_DEVICE_IO_TARGET   0x1000
 
#define FX_LOCK_ORDER_USB_PIPE_IO_TARGET   0x1001
 
#define FX_LOCK_ORDER_DRIVER   0x1010
 
#define FX_LOCK_ORDER_DEVICE   0x1020
 
#define FX_LOCK_ORDER_MP_DEVICE   0x1020
 
#define FX_LOCK_ORDER_DEFAULT_IRP_HANDLER   0x1030
 
#define FX_LOCK_ORDER_QUEUE   0x1030
 
#define FX_LOCK_ORDER_PACKAGE_IO   0x1031
 
#define FX_LOCK_ORDER_REQUEST   0x1040
 
#define FX_LOCK_ORDER_IRPQUEUE   0x1051
 
#define FX_LOCK_ORDER_TIMER   0x1059
 
#define FX_LOCK_ORDER_DPC   0x1060
 
#define FX_LOCK_ORDER_WORKITEM   0x1060
 
#define FX_LOCK_ORDER_CLEANUPLIST   0x1060
 
#define FX_LOCK_ORDER_INTERRUPT   0x1060
 
#define FX_LOCK_ORDER_FILEOBJECT   0x1060
 
#define FX_LOCK_ORDER_DEVICE_LIST   0x1061
 
#define FX_LOCK_ORDER_COLLECTION   0x1070
 
#define FX_LOCK_ORDER_USEROBJECT   0x2000
 
#define FX_LOCK_ORDER_DISPOSELIST   0x8000
 
#define FX_LOCK_ORDER_SYSTEMWORKITEM   FX_LOCK_ORDER_UNKNOWN
 
#define FX_LOCK_ORDER_SYSTEMTHREAD   FX_LOCK_ORDER_UNKNOWN
 
#define FX_CALLBACKLOCK_ORDER_DRIVER   0x10
 
#define FX_CALLBACKLOCK_ORDER_DEVICE   0x20
 
#define FX_CALLBACKLOCK_ORDER_PACKAGE   0x30
 
#define FX_CALLBACKLOCK_ORDER_QUEUE   0x31
 
#define FX_VERIFIER_LOCK_ENTRY(FX_OBJECT_TYPE, FX_LOCK_ORDER)   { FX_OBJECT_TYPE, FX_LOCK_ORDER }
 
#define FX_VERIFIER_LOCK_ENTRIES()
 
#define FX_VERIFIER_CALLBACKLOCK_ENTRIES()
 
#define VERIFIER_THREAD_HASHTABLE_SIZE   64
 

Typedefs

typedef struct FxVerifierOrderMappingpFxVerifierOrderMapping
 
typedef struct FxVerifierThreadTableEntrypFxVerifierThreadTableEntry
 

Macro Definition Documentation

◆ FX_CALLBACKLOCK_ORDER_DEVICE

#define FX_CALLBACKLOCK_ORDER_DEVICE   0x20

Definition at line 156 of file fxverifierlock.hpp.

◆ FX_CALLBACKLOCK_ORDER_DRIVER

#define FX_CALLBACKLOCK_ORDER_DRIVER   0x10

Definition at line 155 of file fxverifierlock.hpp.

◆ FX_CALLBACKLOCK_ORDER_PACKAGE

#define FX_CALLBACKLOCK_ORDER_PACKAGE   0x30

Definition at line 157 of file fxverifierlock.hpp.

◆ FX_CALLBACKLOCK_ORDER_QUEUE

#define FX_CALLBACKLOCK_ORDER_QUEUE   0x31

Definition at line 158 of file fxverifierlock.hpp.

◆ FX_LOCK_ORDER_CLEANUPLIST

#define FX_LOCK_ORDER_CLEANUPLIST   0x1060

Definition at line 117 of file fxverifierlock.hpp.

◆ FX_LOCK_ORDER_COLLECTION

#define FX_LOCK_ORDER_COLLECTION   0x1070

Definition at line 121 of file fxverifierlock.hpp.

◆ FX_LOCK_ORDER_COMMON_BUFFER

#define FX_LOCK_ORDER_COMMON_BUFFER   0x1001

Definition at line 96 of file fxverifierlock.hpp.

◆ FX_LOCK_ORDER_DEFAULT_IRP_HANDLER

#define FX_LOCK_ORDER_DEFAULT_IRP_HANDLER   0x1030

Definition at line 109 of file fxverifierlock.hpp.

◆ FX_LOCK_ORDER_DEVICE

#define FX_LOCK_ORDER_DEVICE   0x1020

Definition at line 107 of file fxverifierlock.hpp.

◆ FX_LOCK_ORDER_DEVICE_LIST

#define FX_LOCK_ORDER_DEVICE_LIST   0x1061

Definition at line 120 of file fxverifierlock.hpp.

◆ FX_LOCK_ORDER_DISPOSELIST

#define FX_LOCK_ORDER_DISPOSELIST   0x8000

Definition at line 127 of file fxverifierlock.hpp.

◆ FX_LOCK_ORDER_DMA_ENABLER

#define FX_LOCK_ORDER_DMA_ENABLER   0x1000

Definition at line 94 of file fxverifierlock.hpp.

◆ FX_LOCK_ORDER_DMA_TRANSACTION

#define FX_LOCK_ORDER_DMA_TRANSACTION   0x1001

Definition at line 95 of file fxverifierlock.hpp.

◆ FX_LOCK_ORDER_DPC

#define FX_LOCK_ORDER_DPC   0x1060

Definition at line 115 of file fxverifierlock.hpp.

◆ FX_LOCK_ORDER_DRIVER

#define FX_LOCK_ORDER_DRIVER   0x1010

Definition at line 106 of file fxverifierlock.hpp.

◆ FX_LOCK_ORDER_FILEOBJECT

#define FX_LOCK_ORDER_FILEOBJECT   0x1060

Definition at line 119 of file fxverifierlock.hpp.

◆ FX_LOCK_ORDER_INTERRUPT

#define FX_LOCK_ORDER_INTERRUPT   0x1060

Definition at line 118 of file fxverifierlock.hpp.

◆ FX_LOCK_ORDER_IO_TARGET

#define FX_LOCK_ORDER_IO_TARGET   0x1000

Definition at line 89 of file fxverifierlock.hpp.

◆ FX_LOCK_ORDER_IRPQUEUE

#define FX_LOCK_ORDER_IRPQUEUE   0x1051

Definition at line 113 of file fxverifierlock.hpp.

◆ FX_LOCK_ORDER_MP_DEVICE

#define FX_LOCK_ORDER_MP_DEVICE   0x1020

Definition at line 108 of file fxverifierlock.hpp.

◆ FX_LOCK_ORDER_NONE

#define FX_LOCK_ORDER_NONE   0x0000

These define the lock order used by verifier for basic objects internal to the driver frameworks.

Higher numbers are "lower" locks in the hierachy, which means a lock can be acquired if its number greater than or equal to the current one.

Correct Order:

FX_LOCK_ORDER_DRIVER -> FX_LOCK_ORDER_QUEUE -> FX_LOCK_ORDER_REQUEST

Incorrect Order:

FX_LOCK_ORDER_DRIVER -> FX_LOCK_ORDER_QUEUE -> FX_LOCK_ORDER_DEVICE

FX_LOCK_ORDER_UNKNOWN represents an object who has not (yet) defined a lock order. It has the highest number, meaning it can be acquired holding any other locks, including itself. At some point in time, this will cause a verifier break point, otherwise we can not fully test the frameworks.

FX_LOCK_ORDER_NONE is a statement by the object that it will not use its Lock/Unlock routines. Use of locks on this object under verifier will cause a verifier breakpoint.

There is a table mapping these from FX_TYPE_* to the lock orders define here in fx\core\FxVerifierLock.cpp

Definition at line 81 of file fxverifierlock.hpp.

◆ FX_LOCK_ORDER_PACKAGE_FDO

#define FX_LOCK_ORDER_PACKAGE_FDO   0x1000

Definition at line 85 of file fxverifierlock.hpp.

◆ FX_LOCK_ORDER_PACKAGE_GENERAL

#define FX_LOCK_ORDER_PACKAGE_GENERAL   0x1000

Definition at line 87 of file fxverifierlock.hpp.

◆ FX_LOCK_ORDER_PACKAGE_IO

#define FX_LOCK_ORDER_PACKAGE_IO   0x1031

Definition at line 111 of file fxverifierlock.hpp.

◆ FX_LOCK_ORDER_PACKAGE_PDO

#define FX_LOCK_ORDER_PACKAGE_PDO   0x1000

Definition at line 84 of file fxverifierlock.hpp.

◆ FX_LOCK_ORDER_QUEUE

#define FX_LOCK_ORDER_QUEUE   0x1030

Definition at line 110 of file fxverifierlock.hpp.

◆ FX_LOCK_ORDER_REQUEST

#define FX_LOCK_ORDER_REQUEST   0x1040

Definition at line 112 of file fxverifierlock.hpp.

◆ FX_LOCK_ORDER_SYSTEMTHREAD

#define FX_LOCK_ORDER_SYSTEMTHREAD   FX_LOCK_ORDER_UNKNOWN

Definition at line 130 of file fxverifierlock.hpp.

◆ FX_LOCK_ORDER_SYSTEMWORKITEM

#define FX_LOCK_ORDER_SYSTEMWORKITEM   FX_LOCK_ORDER_UNKNOWN

Definition at line 129 of file fxverifierlock.hpp.

◆ FX_LOCK_ORDER_TIMER

#define FX_LOCK_ORDER_TIMER   0x1059

Definition at line 114 of file fxverifierlock.hpp.

◆ FX_LOCK_ORDER_UNKNOWN

#define FX_LOCK_ORDER_UNKNOWN   0xFFFF

Definition at line 82 of file fxverifierlock.hpp.

◆ FX_LOCK_ORDER_USB_DEVICE_IO_TARGET

#define FX_LOCK_ORDER_USB_DEVICE_IO_TARGET   0x1000

Definition at line 102 of file fxverifierlock.hpp.

◆ FX_LOCK_ORDER_USB_PIPE_IO_TARGET

#define FX_LOCK_ORDER_USB_PIPE_IO_TARGET   0x1001

Definition at line 103 of file fxverifierlock.hpp.

◆ FX_LOCK_ORDER_USEROBJECT

#define FX_LOCK_ORDER_USEROBJECT   0x2000

Definition at line 123 of file fxverifierlock.hpp.

◆ FX_LOCK_ORDER_WMI_INSTANCE

#define FX_LOCK_ORDER_WMI_INSTANCE   0x1002

Definition at line 92 of file fxverifierlock.hpp.

◆ FX_LOCK_ORDER_WMI_IRP_HANDLER

#define FX_LOCK_ORDER_WMI_IRP_HANDLER   0x1000

Definition at line 86 of file fxverifierlock.hpp.

◆ FX_LOCK_ORDER_WMI_PROVIDER

#define FX_LOCK_ORDER_WMI_PROVIDER   0x1001

Definition at line 91 of file fxverifierlock.hpp.

◆ FX_LOCK_ORDER_WORKITEM

#define FX_LOCK_ORDER_WORKITEM   0x1060

Definition at line 116 of file fxverifierlock.hpp.

◆ FX_VERIFIER_CALLBACKLOCK_ENTRIES

#define FX_VERIFIER_CALLBACKLOCK_ENTRIES ( )
Value:
FX_VERIFIER_LOCK_ENTRY(FX_TYPE_DEVICE, FX_CALLBACKLOCK_ORDER_DEVICE), \
FX_VERIFIER_LOCK_ENTRY(FX_TYPE_QUEUE, FX_CALLBACKLOCK_ORDER_QUEUE), \
FX_VERIFIER_LOCK_ENTRY(0, 0)
#define FX_CALLBACKLOCK_ORDER_QUEUE
#define FX_CALLBACKLOCK_ORDER_PACKAGE
#define FX_CALLBACKLOCK_ORDER_DEVICE
#define FX_VERIFIER_LOCK_ENTRY(FX_OBJECT_TYPE, FX_LOCK_ORDER)
#define FX_CALLBACKLOCK_ORDER_DRIVER

Definition at line 200 of file fxverifierlock.hpp.

◆ FX_VERIFIER_LOCK_ENTRIES

#define FX_VERIFIER_LOCK_ENTRIES ( )

Definition at line 163 of file fxverifierlock.hpp.

◆ FX_VERIFIER_LOCK_ENTRY

#define FX_VERIFIER_LOCK_ENTRY (   FX_OBJECT_TYPE,
  FX_LOCK_ORDER 
)    { FX_OBJECT_TYPE, FX_LOCK_ORDER }

Definition at line 160 of file fxverifierlock.hpp.

◆ VERIFIER_THREAD_HASHTABLE_SIZE

#define VERIFIER_THREAD_HASHTABLE_SIZE   64

Definition at line 226 of file fxverifierlock.hpp.

Typedef Documentation

◆ pFxVerifierOrderMapping

◆ pFxVerifierThreadTableEntry