ReactOS 0.4.15-dev-7127-g2dd0c6c
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
8typedef union _NDIS_RW_LOCK_REFCOUNT {
9 unsigned int RefCount;
10 UCHAR cacheLine[16]; // One refCount per cache line
12
13typedef struct _NDIS_RW_LOCK {
14 union {
15 struct {
18 };
20 };
21
24
25typedef struct _LOCK_STATE {
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__ */
UCHAR KIRQL
Definition: env_spec_w32.h:591
ULONG KSPIN_LOCK
Definition: env_spec_w32.h:72
struct _NDIS_RW_LOCK NDIS_RW_LOCK
struct _NDIS_RW_LOCK * PNDIS_RW_LOCK
#define MAXIMUM_PROCESSORS
Definition: rwlock.h:5
union _NDIS_RW_LOCK_REFCOUNT NDIS_RW_LOCK_REFCOUNT
struct _LOCK_STATE * PLOCK_STATE
struct _LOCK_STATE LOCK_STATE
unsigned short USHORT
Definition: pedump.c:61
USHORT LockState
Definition: rwlock.h:26
KIRQL OldIrql
Definition: rwlock.h:27
KSPIN_LOCK SpinLock
Definition: rwlock.h:16
NDIS_RW_LOCK_REFCOUNT RefCount[MAXIMUM_PROCESSORS]
Definition: rwlock.h:22
PVOID Context
Definition: rwlock.h:17
UCHAR cacheLine[16]
Definition: rwlock.h:10
unsigned int RefCount
Definition: rwlock.h:9
_Reserved_ PVOID Reserved
Definition: winddi.h:3974
unsigned char UCHAR
Definition: xmlstorage.h:181