ReactOS  0.4.14-dev-98-gb0d4763
rwlock.h
Go to the documentation of this file.
1 #ifndef __CROSS_NT_RWLOCK__H__
2 #define __CROSS_NT_RWLOCK__H__
3 
4 #ifndef MAXIMUM_PROCESSORS
5 #define MAXIMUM_PROCESSORS 32
6 #endif
7 
8 typedef union _NDIS_RW_LOCK_REFCOUNT {
9  unsigned int RefCount;
10  UCHAR cacheLine[16]; // One refCount per cache line
12 
13 typedef struct _NDIS_RW_LOCK {
14  union {
15  struct {
17  PVOID Context;
18  };
19  UCHAR Reserved[16];
20  };
21 
24 
25 typedef struct _LOCK_STATE {
27  KIRQL OldIrql;
29 
30 #define RWLOCK_STATE_FREE 0
31 #define RWLOCK_STATE_READ_ACQUIRED 1
32 #define RWLOCK_STATE_WRITE_ACQUIRED 2
33 #define RWLOCK_STATE_RECURSIVE 3
34 #define RWLOCK_STATE_RELEASED 0xffff
35 
36 #define RWLOCK_FOR_WRITE TRUE
37 #define RWLOCK_FOR_READ FALSE
38 
39 #endif // __CROSS_NT_RWLOCK__H__
PVOID Context
Definition: rwlock.h:17
UCHAR KIRQL
Definition: env_spec_w32.h:591
KSPIN_LOCK SpinLock
Definition: rwlock.h:16
_Reserved_ PVOID Reserved
Definition: winddi.h:3974
struct _NDIS_RW_LOCK * PNDIS_RW_LOCK
UCHAR cacheLine[16]
Definition: rwlock.h:10
union _NDIS_RW_LOCK_REFCOUNT NDIS_RW_LOCK_REFCOUNT
struct _LOCK_STATE * PLOCK_STATE
unsigned char UCHAR
Definition: xmlstorage.h:181
#define MAXIMUM_PROCESSORS
Definition: rwlock.h:5
unsigned int RefCount
Definition: rwlock.h:9
USHORT LockState
Definition: rwlock.h:26
unsigned short USHORT
Definition: pedump.c:61
NDIS_RW_LOCK_REFCOUNT RefCount[MAXIMUM_PROCESSORS]
Definition: rwlock.h:22
KIRQL OldIrql
Definition: rwlock.h:27
ULONG KSPIN_LOCK
Definition: env_spec_w32.h:72
struct _NDIS_RW_LOCK NDIS_RW_LOCK
struct _LOCK_STATE LOCK_STATE