From 76bb4781736c92fc882f580c4f7b29f1eff6d800 Mon Sep 17 00:00:00 2001 From: Amine Khaldi Date: Fri, 5 Mar 2010 20:57:21 +0000 Subject: [PATCH] HalAllocateCommonBuffer : - Move it from winddk.h to wdm.h and make it an inline function - NTHALAPI -> FORCEINLINE - PADAPTER_OBJECT AdapterObject -> PDMA_ADAPTER DmaAdapter svn path=/branches/header-work/; revision=45895 --- include/ddk/wdm.h | 20 ++++++++++++++++++++ include/ddk/winddk.h | 9 --------- 2 files changed, 20 insertions(+), 9 deletions(-) diff --git a/include/ddk/wdm.h b/include/ddk/wdm.h index 0f034e4f1d0..e8e3a777cb3 100644 --- a/include/ddk/wdm.h +++ b/include/ddk/wdm.h @@ -10393,6 +10393,26 @@ extern volatile KSYSTEM_TIME KeTickCount; extern BOOLEAN NTSYSAPI NLS_MB_CODE_PAGE_TAG; extern BOOLEAN NTSYSAPI NLS_MB_OEM_CODE_PAGE_TAG; +#if defined(USE_DMA_MACROS) && !defined(_NTHAL_) && (defined(_NTDDK_) || defined(_NTDRIVER_)) || defined(_WDM_INCLUDED_) +FORCEINLINE +PVOID +NTAPI +HalAllocateCommonBuffer( + IN PADAPTER_OBJECT AdapterObject, + IN ULONG Length, + OUT PPHYSICAL_ADDRESS LogicalAddress, + IN BOOLEAN CacheEnabled) +{ + PALLOCATE_COMMON_BUFFER allocateCommonBuffer; + PVOID commonBuffer; + + allocateCommonBuffer = *(DmaAdapter)->DmaOperations->AllocateCommonBuffer; + ASSERT( allocateCommonBuffer != NULL ); + commonBuffer = allocateCommonBuffer( DmaAdapter, Length, LogicalAddress, CacheEnabled ); + return commonBuffer; +} +#endif + #ifdef __cplusplus } #endif diff --git a/include/ddk/winddk.h b/include/ddk/winddk.h index ffe2c0877e2..72b7074e760 100644 --- a/include/ddk/winddk.h +++ b/include/ddk/winddk.h @@ -3758,15 +3758,6 @@ HalAllocateAdapterChannel( IN ULONG NumberOfMapRegisters, IN PDRIVER_CONTROL ExecutionRoutine); -NTHALAPI -PVOID -NTAPI -HalAllocateCommonBuffer( - IN PADAPTER_OBJECT AdapterObject, - IN ULONG Length, - OUT PPHYSICAL_ADDRESS LogicalAddress, - IN BOOLEAN CacheEnabled); - NTHALAPI NTSTATUS NTAPI -- 2.17.1