Commit e3856fd6 authored by Zebediah Figura's avatar Zebediah Figura Committed by Alexandre Julliard

ntoskrnl.exe: Implement APC-level fast mutex functions.

parent ad1f2704
......@@ -727,34 +727,6 @@ done:
return status;
}
/***********************************************************************
* ExAcquireFastMutexUnsafe (NTOSKRNL.EXE.@)
*/
#ifdef DEFINE_FASTCALL1_ENTRYPOINT
DEFINE_FASTCALL1_ENTRYPOINT(ExAcquireFastMutexUnsafe)
void WINAPI __regs_ExAcquireFastMutexUnsafe(PFAST_MUTEX FastMutex)
#else
void WINAPI ExAcquireFastMutexUnsafe(PFAST_MUTEX FastMutex)
#endif
{
FIXME("(%p): stub\n", FastMutex);
}
/***********************************************************************
* ExReleaseFastMutexUnsafe (NTOSKRNL.EXE.@)
*/
#ifdef DEFINE_FASTCALL1_ENTRYPOINT
DEFINE_FASTCALL1_ENTRYPOINT(ExReleaseFastMutexUnsafe)
void WINAPI __regs_ExReleaseFastMutexUnsafe(PFAST_MUTEX FastMutex)
#else
void WINAPI ExReleaseFastMutexUnsafe(PFAST_MUTEX FastMutex)
#endif
{
FIXME("(%p): stub\n", FastMutex);
}
/***********************************************************************
* IoAllocateDriverObjectExtension (NTOSKRNL.EXE.@)
*/
......
......@@ -562,3 +562,41 @@ LIST_ENTRY * WINAPI ExInterlockedRemoveHeadList( LIST_ENTRY *list, KSPIN_LOCK *l
return ret;
}
/***********************************************************************
* ExAcquireFastMutexUnsafe (NTOSKRNL.EXE.@)
*/
#ifdef DEFINE_FASTCALL1_ENTRYPOINT
DEFINE_FASTCALL1_ENTRYPOINT(ExAcquireFastMutexUnsafe)
void WINAPI __regs_ExAcquireFastMutexUnsafe( FAST_MUTEX *mutex )
#else
void WINAPI ExAcquireFastMutexUnsafe( FAST_MUTEX *mutex )
#endif
{
LONG count;
TRACE("mutex %p.\n", mutex);
count = InterlockedDecrement( &mutex->Count );
if (count < 0)
KeWaitForSingleObject( &mutex->Event, Executive, KernelMode, FALSE, NULL );
}
/***********************************************************************
* ExReleaseFastMutexUnsafe (NTOSKRNL.EXE.@)
*/
#ifdef DEFINE_FASTCALL1_ENTRYPOINT
DEFINE_FASTCALL1_ENTRYPOINT(ExReleaseFastMutexUnsafe)
void WINAPI __regs_ExReleaseFastMutexUnsafe( FAST_MUTEX *mutex )
#else
void WINAPI ExReleaseFastMutexUnsafe( FAST_MUTEX *mutex )
#endif
{
LONG count;
TRACE("mutex %p.\n", mutex);
count = InterlockedIncrement( &mutex->Count );
if (count < 1)
KeSetEvent( &mutex->Event, IO_NO_INCREMENT, FALSE );
}
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