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.

123 lines
3.5 KiB

  1. /*** acpitabp.h - ACPI Table IOCTL DLVxD Private Definitions
  2. *
  3. * Author: Michael Tsang
  4. * Created 10/08/97
  5. *
  6. * MODIFICATION HISTORY
  7. */
  8. #ifndef _ACPITABP_H
  9. #define _ACPITABP_H
  10. /*XLATOFF*/
  11. #include <basedef.h>
  12. #ifndef BOOLEAN
  13. #define BOOLEAN BOOL
  14. #endif
  15. #include <vmm.h>
  16. #define USECMDWRAPPERS
  17. #include <vxdwraps.h>
  18. #include <configmg.h>
  19. #include <vwin32.h>
  20. #include <winerror.h>
  21. #define SPEC_VER 100
  22. #include "..\driver\inc\acpitabl.h"
  23. #include "acpitab.h"
  24. /*XLATON*/
  25. /*** Build Options
  26. */
  27. #ifdef DEBUG
  28. #define TRACING
  29. #define DEBUGGER
  30. #endif //DEBUG
  31. /*** Constants
  32. */
  33. #define WARNNAME "ACPITAB"
  34. /*XLATOFF*/
  35. #pragma intrinsic(memcpy)
  36. /*** Global Data
  37. */
  38. #ifdef TRACING
  39. extern int giIndent;
  40. #endif
  41. /*** Macros
  42. */
  43. #define DEREF(x) ((x) = (x))
  44. #define EXPORT __cdecl
  45. #define LOCAL __cdecl
  46. #define BYTEOF(d,i) (((BYTE *)&(d))[i])
  47. #define WORDOF(d,i) (((WORD *)&(d))[i])
  48. #ifdef TRACING
  49. BOOL LOCAL IsTraceOn(BYTE n, char *pszProcName, BOOL fEnter);
  50. #define TRACENAME(s) char *pszTraceName = s;
  51. #define ENTER(n,p) { \
  52. if (IsTraceOn(n, pszTraceName, TRUE)) \
  53. CMDD p; \
  54. ++giIndent; \
  55. }
  56. #define EXIT(n,p) { \
  57. --giIndent; \
  58. if (IsTraceOn(n, pszTraceName, FALSE)) \
  59. CMDD p; \
  60. }
  61. #else
  62. #define TRACENAME(s)
  63. #define ENTER(n,p)
  64. #define EXIT(n,p)
  65. #endif //TRACING
  66. #ifdef DEBUGGER
  67. VOID CM_SYSCTRL ACPITabDebug(VOID);
  68. #endif
  69. #ifdef DEBUG
  70. #define VXD_PAGEABLE_CODE VxD_LOCKED_CODE_SEG
  71. #define VXD_PAGEABLE_DATA VxD_LOCKED_DATA_SEG
  72. #define VXD_LOCKED_CODE VxD_LOCKED_CODE_SEG
  73. #define VXD_LOCKED_DATA VxD_LOCKED_DATA_SEG
  74. #define VXD_INIT_CODE VxD_LOCKED_CODE_SEG
  75. #define VXD_INIT_DATA VxD_LOCKED_DATA_SEG
  76. #define VXD_DEBUG_CODE VxD_LOCKED_CODE_SEG
  77. #define VXD_DEBUG_DATA VxD_LOCKED_DATA_SEG
  78. #define DBG_PRINTF(str) _Debug_Printf_Service##str
  79. #define DBG_WARN(str) { \
  80. _Debug_Printf_Service(WARNNAME ":WARNS:"); \
  81. _Debug_Printf_Service##str; \
  82. _Debug_Printf_Service("\n"); \
  83. }
  84. #define DBG_ERR(str) { \
  85. _Debug_Printf_Service(WARNNAME ":ERROR:"); \
  86. _Debug_Printf_Service##str; \
  87. _Debug_Printf_Service("\n"); \
  88. _asm int 3 \
  89. }
  90. #define ASSERT(x) if (!(x)) \
  91. DBG_ERR(("Assertion failed: file %s, line %d", \
  92. __FILE__, __LINE__))
  93. #else
  94. #define VXD_PAGEABLE_CODE VxD_PAGEABLE_CODE_SEG
  95. #define VXD_PAGEABLE_DATA VxD_PAGEABLE_DATA_SEG
  96. #define VXD_LOCKED_CODE VxD_LOCKED_CODE_SEG
  97. #define VXD_LOCKED_DATA VxD_LOCKED_DATA_SEG
  98. #define VXD_INIT_CODE VxD_INIT_CODE_SEG
  99. #define VXD_INIT_DATA VxD_INIT_DATA_SEG
  100. #define VXD_DEBUG_CODE VxD_DEBUG_ONLY_CODE_SEG
  101. #define VXD_DEBUG_DATA VxD_DEBUG_ONLY_DATA_SEG
  102. #define DBG_PRINTF(str)
  103. #define DBG_WARN(str)
  104. #define DBG_ERR(str)
  105. #define ASSERT(x)
  106. #endif //DEBUG
  107. /*XLATON*/
  108. #endif //ifndef _ACPITABP_H