From 3dab4270101ba86fd867cb9dfef56c22cb14f6da Mon Sep 17 00:00:00 2001 From: Amine Khaldi Date: Fri, 5 Mar 2010 21:03:42 +0000 Subject: [PATCH] HalFreeCommonBuffer and HalReadDmaCounter : - Move them from winddk.h to wdm.h and make them inline functions - NTHALAPI -> FORCEINLINE - PADAPTER_OBJECT AdapterObject -> PDMA_ADAPTER DmaAdapter svn path=/branches/header-work/; revision=45896 --- include/ddk/wdm.h | 33 +++++++++++++++++++++++++++++++++ include/ddk/winddk.h | 16 ---------------- 2 files changed, 33 insertions(+), 16 deletions(-) diff --git a/include/ddk/wdm.h b/include/ddk/wdm.h index e8e3a777cb3..97068abf803 100644 --- a/include/ddk/wdm.h +++ b/include/ddk/wdm.h @@ -10411,6 +10411,39 @@ HalAllocateCommonBuffer( commonBuffer = allocateCommonBuffer( DmaAdapter, Length, LogicalAddress, CacheEnabled ); return commonBuffer; } + +FORCEINLINE +VOID +NTAPI +HalFreeCommonBuffer( + IN PDMA_ADAPTER DmaAdapter, + IN ULONG Length, + IN PHYSICAL_ADDRESS LogicalAddress, + IN PVOID VirtualAddress, + IN BOOLEAN CacheEnabled) +{ + PFREE_COMMON_BUFFER freeCommonBuffer; + + freeCommonBuffer = *(DmaAdapter)->DmaOperations->FreeCommonBuffer; + ASSERT( freeCommonBuffer != NULL ); + freeCommonBuffer( DmaAdapter, Length, LogicalAddress, VirtualAddress, CacheEnabled ); +} + +FORCEINLINE +ULONG +NTAPI +HalReadDmaCounter( + IN PDMA_ADAPTER DmaAdapter) +{ + PREAD_DMA_COUNTER readDmaCounter; + ULONG counter; + + readDmaCounter = *(DmaAdapter)->DmaOperations->ReadDmaCounter; + ASSERT( readDmaCounter != NULL ); + counter = readDmaCounter( DmaAdapter ); + return counter; +} + #endif #ifdef __cplusplus diff --git a/include/ddk/winddk.h b/include/ddk/winddk.h index 72b7074e760..54464982d44 100644 --- a/include/ddk/winddk.h +++ b/include/ddk/winddk.h @@ -3771,16 +3771,6 @@ HalAssignSlotResources( IN ULONG SlotNumber, IN OUT PCM_RESOURCE_LIST *AllocatedResources); -NTHALAPI -VOID -NTAPI -HalFreeCommonBuffer( - IN PADAPTER_OBJECT AdapterObject, - IN ULONG Length, - IN PHYSICAL_ADDRESS LogicalAddress, - IN PVOID VirtualAddress, - IN BOOLEAN CacheEnabled); - NTHALAPI PADAPTER_OBJECT NTAPI @@ -3826,12 +3816,6 @@ HalGetInterruptVector( OUT PKIRQL Irql, OUT PKAFFINITY Affinity); -NTHALAPI -ULONG -NTAPI -HalReadDmaCounter( - IN PADAPTER_OBJECT AdapterObject); - NTHALAPI ULONG NTAPI