HalFreeCommonBuffer and HalReadDmaCounter :
authorAmine Khaldi <amine.khaldi@reactos.org>
Fri, 5 Mar 2010 21:03:42 +0000 (21:03 +0000)
committerAmine Khaldi <amine.khaldi@reactos.org>
Fri, 5 Mar 2010 21:03:42 +0000 (21:03 +0000)
- 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
include/ddk/winddk.h

index e8e3a77..97068ab 100644 (file)
@@ -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
index 72b7074..5446498 100644 (file)
@@ -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