include: Add ExInitializeFastMutex() definition.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
5b465c5096
commit
ad1f270430
|
@ -168,12 +168,14 @@ typedef struct _OBJECT_TYPE *POBJECT_TYPE;
|
||||||
typedef struct _OBJECT_HANDLE_INFORMATION *POBJECT_HANDLE_INFORMATION;
|
typedef struct _OBJECT_HANDLE_INFORMATION *POBJECT_HANDLE_INFORMATION;
|
||||||
typedef struct _ZONE_HEADER *PZONE_HEADER;
|
typedef struct _ZONE_HEADER *PZONE_HEADER;
|
||||||
|
|
||||||
|
#define FM_LOCK_BIT 0x1
|
||||||
|
|
||||||
typedef struct _FAST_MUTEX
|
typedef struct _FAST_MUTEX
|
||||||
{
|
{
|
||||||
LONG Count;
|
LONG Count;
|
||||||
PKTHREAD Owner;
|
PKTHREAD Owner;
|
||||||
ULONG Contention;
|
ULONG Contention;
|
||||||
KEVENT Gate;
|
KEVENT Event;
|
||||||
ULONG OldIrql;
|
ULONG OldIrql;
|
||||||
} FAST_MUTEX, *PFAST_MUTEX;
|
} FAST_MUTEX, *PFAST_MUTEX;
|
||||||
|
|
||||||
|
@ -1593,4 +1595,12 @@ NTSTATUS WINAPI ZwWaitForMultipleObjects(ULONG,const HANDLE*,BOOLEAN,BOOLEAN,co
|
||||||
NTSTATUS WINAPI ZwWriteFile(HANDLE,HANDLE,PIO_APC_ROUTINE,PVOID,PIO_STATUS_BLOCK,const void*,ULONG,PLARGE_INTEGER,PULONG);
|
NTSTATUS WINAPI ZwWriteFile(HANDLE,HANDLE,PIO_APC_ROUTINE,PVOID,PIO_STATUS_BLOCK,const void*,ULONG,PLARGE_INTEGER,PULONG);
|
||||||
NTSTATUS WINAPI ZwYieldExecution(void);
|
NTSTATUS WINAPI ZwYieldExecution(void);
|
||||||
|
|
||||||
|
static inline void ExInitializeFastMutex( FAST_MUTEX *mutex )
|
||||||
|
{
|
||||||
|
mutex->Count = FM_LOCK_BIT;
|
||||||
|
mutex->Owner = NULL;
|
||||||
|
mutex->Contention = 0;
|
||||||
|
KeInitializeEvent( &mutex->Event, SynchronizationEvent, FALSE );
|
||||||
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue