Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

127 lines
3.1 KiB

  1. //+-------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. //
  5. // Copyright (C) Microsoft Corporation, 1997 - 1998
  6. //
  7. // File: luext.h
  8. //
  9. //--------------------------------------------------------------------------
  10. #if !defined (___luext_h___)
  11. #define ___luext_h___
  12. #if !DBG
  13. #define RefPdoWithTag(a,b,c) RefPdo(a,b)
  14. #define RefPdoWithSpinLockHeldWithTag(a,b,c) RefPdoWithSpinLockHeld(a,b)
  15. #define RefLogicalUnitExtensionWithTag(a,b,c,d,e,f) RefLogicalUnitExtension(a,b,c,d,e)
  16. #define UnrefPdoWithTag(a,b) UnrefPdo(a)
  17. #define UnrefLogicalUnitExtensionWithTag(a,b,c) UnrefLogicalUnitExtension(a,b)
  18. #define AllocatePdoWithTag(a,b,c) AllocatePdo(a,b)
  19. #define FreePdoWithTag(a,b,c,d) FreePdo(a,b,c)
  20. #define NextLogUnitExtensionWithTag(a,b,c,d) NextLogUnitExtension(a,b,c)
  21. #else
  22. #define RefPdoWithTag RefPdo
  23. #define RefPdoWithSpinLockHeldWithTag RefPdoWithSpinLockHeld
  24. #define RefLogicalUnitExtensionWithTag RefLogicalUnitExtension
  25. #define UnrefPdoWithTag UnrefPdo
  26. #define UnrefLogicalUnitExtensionWithTag UnrefLogicalUnitExtension
  27. #define AllocatePdoWithTag AllocatePdo
  28. #define FreePdoWithTag FreePdo
  29. #define NextLogUnitExtensionWithTag NextLogUnitExtension
  30. #endif // DBG
  31. PPDO_EXTENSION
  32. RefPdo(
  33. PDEVICE_OBJECT PhysicalDeviceObject,
  34. BOOLEAN RemovedOk
  35. DECLARE_EXTRA_DEBUG_PARAMETER(PVOID, Tag)
  36. );
  37. PPDO_EXTENSION
  38. RefPdoWithSpinLockHeld(
  39. PDEVICE_OBJECT PhysicalDeviceObject,
  40. BOOLEAN RemovedOk
  41. DECLARE_EXTRA_DEBUG_PARAMETER(PVOID, Tag)
  42. );
  43. PPDO_EXTENSION
  44. RefLogicalUnitExtension(
  45. PFDO_EXTENSION DeviceExtension,
  46. UCHAR PathId,
  47. UCHAR TargetId,
  48. UCHAR Lun,
  49. BOOLEAN RemovedOk
  50. DECLARE_EXTRA_DEBUG_PARAMETER(PVOID, Tag)
  51. );
  52. VOID
  53. UnrefPdo(
  54. PPDO_EXTENSION PdoExtension
  55. DECLARE_EXTRA_DEBUG_PARAMETER(PVOID, Tag)
  56. );
  57. VOID
  58. UnrefLogicalUnitExtension(
  59. PFDO_EXTENSION FdoExtension,
  60. PPDO_EXTENSION PdoExtension
  61. DECLARE_EXTRA_DEBUG_PARAMETER(PVOID, Tag)
  62. );
  63. PPDO_EXTENSION
  64. AllocatePdo(
  65. IN PFDO_EXTENSION FdoExtension,
  66. IN IDE_PATH_ID PathId
  67. DECLARE_EXTRA_DEBUG_PARAMETER(PVOID, Tag)
  68. );
  69. NTSTATUS
  70. FreePdo(
  71. IN PPDO_EXTENSION PdoExtension,
  72. IN BOOLEAN Sync,
  73. IN BOOLEAN IoDeleteDevice
  74. DECLARE_EXTRA_DEBUG_PARAMETER(PVOID, Tag)
  75. );
  76. PPDO_EXTENSION
  77. NextLogUnitExtension(
  78. IN PFDO_EXTENSION FdoExtension,
  79. IN OUT PIDE_PATH_ID PathId,
  80. IN BOOLEAN RemovedOk
  81. DECLARE_EXTRA_DEBUG_PARAMETER(PVOID, Tag)
  82. );
  83. VOID
  84. KillPdo(
  85. IN PPDO_EXTENSION PdoExtension
  86. );
  87. #if !DBG
  88. #define IdeInterlockedIncrement(pdoe, Addend, Tag) InterlockedIncrement(Addend)
  89. #define IdeInterlockedDecrement(pdoe, Addend, Tag) InterlockedDecrement(Addend)
  90. #else
  91. LONG
  92. IdeInterlockedIncrement (
  93. IN PPDO_EXTENSION PdoExtension,
  94. IN PLONG Addend,
  95. IN PVOID Tag
  96. );
  97. LONG
  98. IdeInterlockedDecrement (
  99. IN PPDO_EXTENSION PdoExtension,
  100. IN PLONG Addend,
  101. IN PVOID Tag
  102. );
  103. #endif
  104. #endif // ___luext_h___