diff options
author | wpaul <wpaul@FreeBSD.org> | 2005-03-28 20:46:08 +0000 |
---|---|---|
committer | wpaul <wpaul@FreeBSD.org> | 2005-03-28 20:46:08 +0000 |
commit | 3e1273271df9591a9b70dcd51fd2d0412782bf5b (patch) | |
tree | 2abc940f16bcb75532a21008a7c80121c34c5714 /sys/compat | |
parent | 386c0634e44a31131a6c99cab966168692c5d3c9 (diff) | |
download | FreeBSD-src-3e1273271df9591a9b70dcd51fd2d0412782bf5b.zip FreeBSD-src-3e1273271df9591a9b70dcd51fd2d0412782bf5b.tar.gz |
More additions for amd64:
- On amd64, InterlockedPushEntrySList() and InterlockedPopEntrySList()
are mapped to ExpInterlockedPushEntrySList and
ExpInterlockedPopEntrySList() via macros (which do the same thing).
Add IMPORT_FUNC_MAP()s for these.
- Implement ExQueryDepthSList().
Diffstat (limited to 'sys/compat')
-rw-r--r-- | sys/compat/ndis/subr_ntoskrnl.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/sys/compat/ndis/subr_ntoskrnl.c b/sys/compat/ndis/subr_ntoskrnl.c index c8ef3b0..285e25c 100644 --- a/sys/compat/ndis/subr_ntoskrnl.c +++ b/sys/compat/ndis/subr_ntoskrnl.c @@ -138,6 +138,8 @@ __fastcall static slist_entry __fastcall static slist_entry *ExInterlockedPopEntrySList(REGARGS2(slist_header *head, kspin_lock *lock)); +__stdcall static uint16_t + ExQueryDepthSList(slist_header *); __fastcall static uint32_t InterlockedIncrement(REGARGS1(volatile uint32_t *addend)); __fastcall static uint32_t @@ -1697,6 +1699,20 @@ ExInterlockedPopEntrySList(REGARGS2(slist_header *head, kspin_lock *lock)) return(first); } +__stdcall static uint16_t +ExQueryDepthSList(head) + slist_header *head; +{ + uint16_t depth; + uint8_t irql; + + KeAcquireSpinLock(&ntoskrnl_global, &irql); + depth = head->slh_list.slh_depth; + KeReleaseSpinLock(&ntoskrnl_global, irql); + + return(depth); +} + /* * The KeInitializeSpinLock(), KefAcquireSpinLockAtDpcLevel() * and KefReleaseSpinLockFromDpcLevel() appear to be analagous @@ -2719,6 +2735,10 @@ image_patch_table ntoskrnl_functbl[] = { IMPORT_FUNC(ExDeleteNPagedLookasideList), IMPORT_FUNC(InterlockedPopEntrySList), IMPORT_FUNC(InterlockedPushEntrySList), + IMPORT_FUNC(ExQueryDepthSList), + IMPORT_FUNC_MAP(ExpInterlockedPopEntrySList, InterlockedPopEntrySList), + IMPORT_FUNC_MAP(ExpInterlockedPushEntrySList, + InterlockedPushEntrySList), IMPORT_FUNC(ExInterlockedPopEntrySList), IMPORT_FUNC(ExInterlockedPushEntrySList), IMPORT_FUNC(ExAllocatePoolWithTag), |