Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/hal/hal.c | 31 +++++++++++++++++++++++++++++++ dlls/hal/hal.spec | 4 ++-- 2 files changed, 33 insertions(+), 2 deletions(-)
diff --git a/dlls/hal/hal.c b/dlls/hal/hal.c index 5b3ee44cff..6dd517d0df 100644 --- a/dlls/hal/hal.c +++ b/dlls/hal/hal.c @@ -49,6 +49,21 @@ WINE_DEFAULT_DEBUG_CHANNEL(ntoskrnl); "pushl %eax\n\t" \ "jmp " __ASM_NAME("__regs_") #name __ASM_STDCALL(8))
+extern void * WINAPI call_fastcall_func1( void *func, const void *a ); +__ASM_GLOBAL_FUNC( call_fastcall_func1, + "popl %ecx\n\t" + "popl %eax\n\t" + "xchgl (%esp),%ecx\n\t" + "jmp *%eax" ); + +extern void * WINAPI call_fastcall_func2( void *func, const void *a, const void *b ); +__ASM_GLOBAL_FUNC( call_fastcall_func2, + "popl %edx\n\t" + "popl %eax\n\t" + "popl %ecx\n\t" + "xchgl (%esp),%edx\n\t" + "jmp *%eax" ); + DEFINE_FASTCALL1_ENTRYPOINT( ExAcquireFastMutex ) VOID WINAPI DECLSPEC_HIDDEN __regs_ExAcquireFastMutex(PFAST_MUTEX FastMutex) { @@ -94,6 +109,22 @@ void WINAPI KeReleaseSpinLock( KSPIN_LOCK *lock, KIRQL irql ) TRACE("lock %p, irql %u.\n", lock, irql); KeReleaseSpinLockFromDpcLevel( lock ); } + +extern void WINAPI KeAcquireInStackQueuedSpinLockAtDpcLevel( KSPIN_LOCK *, KLOCK_QUEUE_HANDLE * ); + +DEFINE_FASTCALL2_ENTRYPOINT( KeAcquireInStackQueuedSpinLock ) +void WINAPI DECLSPEC_HIDDEN __regs_KeAcquireInStackQueuedSpinLock( KSPIN_LOCK *lock, KLOCK_QUEUE_HANDLE *queue ) +{ + call_fastcall_func2( KeAcquireInStackQueuedSpinLockAtDpcLevel, lock, queue ); +} + +extern void WINAPI KeReleaseInStackQueuedSpinLockFromDpcLevel( KLOCK_QUEUE_HANDLE * ); + +DEFINE_FASTCALL1_ENTRYPOINT( KeReleaseInStackQueuedSpinLock ) +void WINAPI DECLSPEC_HIDDEN __regs_KeReleaseInStackQueuedSpinLock( KLOCK_QUEUE_HANDLE *queue ) +{ + call_fastcall_func1( KeReleaseInStackQueuedSpinLockFromDpcLevel, queue ); +} #endif /* __i386__ */
#if defined(__i386__) || defined(__arm__) || defined(__aarch64__) diff --git a/dlls/hal/hal.spec b/dlls/hal/hal.spec index b4ec5126e5..16822fcc9f 100644 --- a/dlls/hal/hal.spec +++ b/dlls/hal/hal.spec @@ -4,12 +4,12 @@ @ stub HalClearSoftwareInterrupt @ stub HalRequestSoftwareInterrupt @ stub HalSystemVectorDispatchEntry -@ stdcall -norelay KeAcquireInStackQueuedSpinLock(ptr ptr) ntoskrnl.exe.KeAcquireInStackQueuedSpinLock +@ stdcall -arch=i386 -norelay KeAcquireInStackQueuedSpinLock(ptr ptr) @ stub KeAcquireInStackQueuedSpinLockRaiseToSynch @ stub KeAcquireQueuedSpinLock @ stub KeAcquireQueuedSpinLockRaiseToSynch @ stub KeAcquireSpinLockRaiseToSynch -@ stdcall -norelay KeReleaseInStackQueuedSpinLock(ptr) ntoskrnl.exe.KeReleaseInStackQueuedSpinLock +@ stdcall -arch=i386 -norelay KeReleaseInStackQueuedSpinLock(ptr) @ stub KeReleaseQueuedSpinLock @ stub KeTryToAcquireQueuedSpinLock @ stub KeTryToAcquireQueuedSpinLockRaiseToSynch