mirror of
https://github.com/reactos/reactos.git
synced 2024-10-25 07:26:45 +00:00
479c28b333
Say hello to the "XDK" (preliminary name). A set of headers from wich certain other headers (wdm, ntifs, ntddk, winnt) shall one day be autogenerated. I added a .bat file that autogenerates wdn.h from wdm.template.h and the headers. Others will follow. svn path=/branches/header-work/; revision=46157
55 lines
1.3 KiB
C
55 lines
1.3 KiB
C
|
|
#if defined(USE_DMA_MACROS) && !defined(_NTHAL_) && (defined(_NTDDK_) || defined(_NTDRIVER_)) || defined(_WDM_INCLUDED_)
|
|
FORCEINLINE
|
|
PVOID
|
|
NTAPI
|
|
HalAllocateCommonBuffer(
|
|
IN PDMA_ADAPTER DmaAdapter,
|
|
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;
|
|
}
|
|
|
|
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
|
|
|