Commit c212987d authored by Etaash Mathamsetty's avatar Etaash Mathamsetty Committed by Alexandre Julliard

ntoskrnl.exe: Implement KeInitializeGuardedMutex.

parent 0c24f2b8
...@@ -577,6 +577,7 @@ ...@@ -577,6 +577,7 @@
@ stub KeInitializeInterrupt @ stub KeInitializeInterrupt
@ stub KeInitializeMutant @ stub KeInitializeMutant
@ stdcall KeInitializeMutex(ptr long) @ stdcall KeInitializeMutex(ptr long)
@ stdcall KeInitializeGuardedMutex(ptr)
@ stub KeInitializeQueue @ stub KeInitializeQueue
@ stdcall KeInitializeSemaphore(ptr long long) @ stdcall KeInitializeSemaphore(ptr long long)
@ stdcall KeInitializeSpinLock(ptr) NTOSKRNL_KeInitializeSpinLock @ stdcall KeInitializeSpinLock(ptr) NTOSKRNL_KeInitializeSpinLock
......
...@@ -427,6 +427,18 @@ LONG WINAPI KeReleaseMutex( PRKMUTEX mutex, BOOLEAN wait ) ...@@ -427,6 +427,18 @@ LONG WINAPI KeReleaseMutex( PRKMUTEX mutex, BOOLEAN wait )
return ret; return ret;
} }
/***********************************************************************
* KeInitializeGuardedMutex (NTOSKRNL.EXE.@)
*/
void WINAPI KeInitializeGuardedMutex(PKGUARDED_MUTEX mutex)
{
TRACE("mutex %p.\n", mutex);
mutex->Count = FM_LOCK_BIT;
mutex->Owner = NULL;
mutex->Contention = 0;
KeInitializeEvent(&mutex->Event, SynchronizationEvent, FALSE);
}
static void CALLBACK ke_timer_complete_proc(PTP_CALLBACK_INSTANCE instance, void *timer_, PTP_TIMER tp_timer) static void CALLBACK ke_timer_complete_proc(PTP_CALLBACK_INSTANCE instance, void *timer_, PTP_TIMER tp_timer)
{ {
KTIMER *timer = timer_; KTIMER *timer = timer_;
......
...@@ -253,6 +253,23 @@ typedef struct _FAST_MUTEX ...@@ -253,6 +253,23 @@ typedef struct _FAST_MUTEX
ULONG OldIrql; ULONG OldIrql;
} FAST_MUTEX, *PFAST_MUTEX; } FAST_MUTEX, *PFAST_MUTEX;
typedef struct _KGUARDED_MUTEX
{
LONG Count;
PKTHREAD Owner;
ULONG Contention;
KEVENT Event;
union
{
struct
{
SHORT KernelApcDisable;
SHORT SpecialApcDisable;
};
ULONG CombinedApcDisable;
};
} KGUARDED_MUTEX, *PKGUARDED_MUTEX;
#define MAXIMUM_VOLUME_LABEL_LENGTH (32 * sizeof(WCHAR)) #define MAXIMUM_VOLUME_LABEL_LENGTH (32 * sizeof(WCHAR))
typedef struct _VPB { typedef struct _VPB {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment