reactos/include/xdk/halfuncs.h
Amine Khaldi b5c5fd533b [PSDK]
- Add devpropdef.h and evntprov.h
- Fix UOW redefinition.
[DDK]
- Fix PGUID redefinition.
[XDK]
- Add wmitypes.h and include it in wdm.h autogeneration template.
- Move several definitions to their appropriate places.
- Add HalGetDmaAlignment, LEGACY_BUS_INFORMATION, IO_DEVICE_EJECT_CALLBACK, PLUGPLAY_PROPERTY_PERSISTENT, and several missing Io*, DEVICE_*, REENUMERATE_*, PCI_*, PNP_*, Ob*, OB_*, PO_*, Wmi*, Etw* and ACPI related definitions.
- Add CmKeyObjectType to exported object types.
- Fix UOW redefinition.
- Group some related definitions.
[WDM]
- Update wdm.h to reflect XDK changes.

svn path=/branches/header-work/; revision=46329
2010-03-22 01:00:05 +00:00

69 lines
1.6 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;
}
FORCEINLINE
ULONG
HalGetDmaAlignment(
IN PDMA_ADAPTER DmaAdapter)
{
PGET_DMA_ALIGNMENT getDmaAlignment;
ULONG alignment;
getDmaAlignment = *(DmaAdapter)->DmaOperations->GetDmaAlignment;
ASSERT( getDmaAlignment != NULL );
alignment = getDmaAlignment( DmaAdapter );
return alignment;
}
#endif