Leaked source code of windows server 2003
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.

94 lines
4.2 KiB

  1. #ifndef _GLOBAL_HPP_
  2. #define _GLOBAL_HPP_
  3. // Ruler
  4. // 1 2 3 4 5 6 7 8
  5. //345678901234567890123456789012345678901234567890123456789012345678901234567890
  6. /********************************************************************/
  7. /* */
  8. /* The standard layout. */
  9. /* */
  10. /* The standard layout for 'hpp' files for this code is as */
  11. /* follows: */
  12. /* */
  13. /* 1. Include files. */
  14. /* 2. Constants exported from the class. */
  15. /* 3. Data structures exported from the class. */
  16. /* 4. Forward references to other data structures. */
  17. /* 5. Class specifications (including inline functions). */
  18. /* 6. Additional large inline functions. */
  19. /* */
  20. /* Any portion that is not required is simply omitted. */
  21. /* */
  22. /********************************************************************/
  23. #include "Features.hpp"
  24. #include "Standard.hpp"
  25. #include "System.hpp"
  26. /********************************************************************/
  27. /* */
  28. /* The standard macros. */
  29. /* */
  30. /* The following are standard macros used by various */
  31. /* classes in this program. */
  32. /* */
  33. /********************************************************************/
  34. #define FIELDOFFSET( Type,Field ) ((SBIT16) & (((Type *)0) -> Field))
  35. #define TO_DO( Message ) message ( "---- To do ---->>>> " Message )
  36. #ifdef DISABLE_STRUCTURED_EXCEPTIONS
  37. #define TRY try
  38. #else
  39. #define TRY __try
  40. #endif
  41. /********************************************************************/
  42. /* */
  43. /* The standard constants. */
  44. /* */
  45. /* The following are standard constants used by various */
  46. /* classes in this program. */
  47. /* */
  48. /********************************************************************/
  49. //
  50. // The hardware cache line size.
  51. //
  52. CONST SBIT32 CacheLineSize = 32;
  53. CONST SBIT32 CacheLineMask = (CacheLineSize - 1);
  54. CONST SBIT32 NoAlignment = 1;
  55. //
  56. // The end of a linked list.
  57. //
  58. CONST INT EndOfList = -1;
  59. //
  60. // The boolean constants.
  61. //
  62. CONST BOOLEAN False = 0;
  63. CONST BOOLEAN True = 1;
  64. //
  65. // Various misc constants.
  66. //
  67. CONST INT DebugBufferSize = 8192;
  68. CONST INT ExpandStore = 2;
  69. CONST INT MaxCpus = 32;
  70. CONST INT NoFlags = 0;
  71. /********************************************************************/
  72. /* */
  73. /* The standard functions. */
  74. /* */
  75. /* The following are standard functions used by various */
  76. /* classes in multiple applications. */
  77. /* */
  78. /********************************************************************/
  79. VOID DebugPrint( CONST CHAR *Format,... );
  80. VOID Failure( char *Message );
  81. #endif