summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sys/compat/ndis/ntoskrnl_var.h5
-rw-r--r--sys/compat/ndis/subr_ntoskrnl.c27
2 files changed, 5 insertions, 27 deletions
diff --git a/sys/compat/ndis/ntoskrnl_var.h b/sys/compat/ndis/ntoskrnl_var.h
index 4c0112a..54ae903 100644
--- a/sys/compat/ndis/ntoskrnl_var.h
+++ b/sys/compat/ndis/ntoskrnl_var.h
@@ -1103,8 +1103,6 @@ __stdcall extern uint32_t KeSetEvent(nt_kevent *, uint32_t, uint8_t);
__stdcall extern uint32_t KeResetEvent(nt_kevent *);
__fastcall extern void KefAcquireSpinLockAtDpcLevel(REGARGS1(kspin_lock *));
__fastcall extern void KefReleaseSpinLockFromDpcLevel(REGARGS1(kspin_lock *));
-__stdcall extern uint8_t KeAcquireSpinLockRaiseToDpc(kspin_lock *);
-__stdcall extern void KeReleaseSpinLock(kspin_lock *, uint8_t);
__stdcall extern void KeInitializeSpinLock(kspin_lock *);
__stdcall extern void *ExAllocatePoolWithTag(uint32_t, size_t, uint32_t);
__stdcall extern void ExFreePool(void *);
@@ -1138,7 +1136,8 @@ __stdcall void IoFreeMdl(mdl *);
#endif /* __i386__ */
#ifdef __amd64__
-#define KeAcquireSpinLock(a, b) *(b) = KeAcquireSpinLockRaiseToDpc(a)
+#define KeAcquireSpinLock(a, b) *(b) = KfAcquireSpinLock(a)
+#define KeReleaseSpinLock(a, b) KfReleaseSpinLock(a, b)
/*
* These may need to be redefined later;
diff --git a/sys/compat/ndis/subr_ntoskrnl.c b/sys/compat/ndis/subr_ntoskrnl.c
index 5558705..eb7f5ba 100644
--- a/sys/compat/ndis/subr_ntoskrnl.c
+++ b/sys/compat/ndis/subr_ntoskrnl.c
@@ -1498,27 +1498,6 @@ KefReleaseSpinLockFromDpcLevel(REGARGS1(kspin_lock *lock))
return;
}
-__stdcall uint8_t
-KeAcquireSpinLockRaiseToDpc(lock)
- kspin_lock *lock;
-{
- uint8_t oldirql;
-
- oldirql = FASTCALL1(KfAcquireSpinLock, lock);
- return(oldirql);
-}
-
-#ifndef __i386__
-__stdcall void
-KeReleaseSpinLock(lock, irql)
- kspin_lock *lock;
- uint8_t irql;
-{
- FASTCALL2(KfReleaseSpinLock, lock, irql);
- return;
-}
-#endif
-
__fastcall static uint32_t
InterlockedIncrement(REGARGS1(volatile uint32_t *addend))
{
@@ -2392,7 +2371,7 @@ image_patch_table ntoskrnl_functbl[] = {
IMPORT_FUNC(strlen),
IMPORT_FUNC(memcpy),
IMPORT_FUNC_MAP(memmove, ntoskrnl_memset),
- IMPORT_FUNC(ntoskrnl_memset),
+ IMPORT_FUNC_MAP(memset, ntoskrnl_memset),
IMPORT_FUNC(IoAllocateDriverObjectExtension),
IMPORT_FUNC(IoGetDriverObjectExtension),
IMPORT_FUNC(IofCallDriver),
@@ -2442,8 +2421,8 @@ image_patch_table ntoskrnl_functbl[] = {
IMPORT_FUNC(ExInterlockedPushEntrySList),
IMPORT_FUNC(KefAcquireSpinLockAtDpcLevel),
IMPORT_FUNC(KefReleaseSpinLockFromDpcLevel),
- IMPORT_FUNC(KeAcquireSpinLockRaiseToDpc),
- IMPORT_FUNC(KeReleaseSpinLock),
+ IMPORT_FUNC_MAP(KeAcquireSpinLockRaiseToDpc, KfAcquireSpinLock),
+ IMPORT_FUNC_MAP(KeReleaseSpinLock, KfReleaseSpinLock),
IMPORT_FUNC(InterlockedIncrement),
IMPORT_FUNC(InterlockedDecrement),
IMPORT_FUNC(ExInterlockedAddLargeStatistic),
OpenPOWER on IntegriCloud