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.

148 lines
4.0 KiB

  1. #ifndef LKR_CUST_DECLARE_TABLE
  2. #include "lkrhash.h"
  3. #ifndef __LKRHASH_NO_NAMESPACE__
  4. #define LKRHASH_NS LKRhash
  5. using namespace LKRhash;
  6. typedef LKRhash::CLKRLinearHashTable CLinearHashTable;
  7. typedef LKRhash::CLKRHashTable CHashTable;
  8. #else
  9. #define LKRHASH_NS
  10. typedef CLKRLinearHashTable CLinearHashTable;
  11. typedef CLKRHashTable CHashTable;
  12. #endif // !__LKRHASH_NO_NAMESPACE__
  13. typedef
  14. BOOL
  15. (CALLBACK * PFN_LKHT_DUMP)(
  16. IN CLKRHashTable* pht,
  17. IN INT nVerbose);
  18. typedef
  19. BOOL
  20. (CALLBACK * PFN_LKLH_DUMP)(
  21. IN CLKRLinearHashTable* plht,
  22. IN INT nVerbose);
  23. typedef
  24. BOOL
  25. (CALLBACK * PFN_RECORD_DUMP)(
  26. IN const void* pvRecord,
  27. IN DWORD dwSignature,
  28. IN INT nVerbose);
  29. struct LKR_CUST_EXTN {
  30. LPCSTR m_pszTableName;
  31. PFN_LKHT_DUMP m_pfn_LKHT_Dump;
  32. PFN_LKLH_DUMP m_pfn_LKLH_Dump;
  33. PFN_RECORD_DUMP m_pfn_Record_Dump;
  34. };
  35. LKR_CUST_EXTN*
  36. FindLkrCustExtn(
  37. LPCSTR cmdName,
  38. VOID* lkrAddress,
  39. DWORD& rdwSig);
  40. BOOL
  41. EnumerateBucketChain(
  42. LKR_CUST_EXTN* plce,
  43. IN LOCK_LOCKTYPE ltBucketLockType,
  44. IN INT iBkt,
  45. IN CBucket* pbkt,
  46. IN INT nVerbose);
  47. BOOL
  48. EnumerateLKRLinearHashTable(
  49. LKR_CUST_EXTN* plce,
  50. IN CLinearHashTable* plht,
  51. IN INT nVerbose);
  52. BOOL
  53. EnumerateLKRhashTable(
  54. LKR_CUST_EXTN* plce,
  55. IN CHashTable* pht,
  56. IN INT nVerbose);
  57. # define BEGIN_LKR_EXTN_TABLE()
  58. # define LKR_EXTN_DECLARE(_TableStr, _Fn_LKHT_Dump, _Fn_LKLH_Dump, _Fn_Record_Dump) \
  59. \
  60. extern \
  61. BOOL \
  62. WINAPI \
  63. _Fn_LKHT_Dump( \
  64. IN CLKRHashTable* pht, \
  65. IN INT nVerbose); \
  66. \
  67. extern \
  68. BOOL \
  69. WINAPI \
  70. _Fn_LKLH_Dump( \
  71. IN CLKRLinearHashTable* plht, \
  72. IN INT nVerbose); \
  73. \
  74. extern \
  75. BOOL \
  76. WINAPI \
  77. _Fn_Record_Dump( \
  78. IN const void* pvRecord, \
  79. IN DWORD dwSignature, \
  80. IN INT nVerbose); \
  81. # define END_LKR_EXTN_TABLE()
  82. #else // LKR_CUST_DECLARE_TABLE
  83. #undef BEGIN_LKR_EXTN_TABLE
  84. #undef LKR_EXTN_DECLARE
  85. #undef END_LKR_EXTN_TABLE
  86. #define BEGIN_LKR_EXTN_TABLE() \
  87. LKR_CUST_EXTN g_alce[] = {
  88. #define LKR_EXTN_DECLARE(_TableStr, _Fn_LKHT_Dump, _Fn_LKLH_Dump, _Fn_Record_Dump) \
  89. { #_TableStr, _Fn_LKHT_Dump, _Fn_LKLH_Dump, _Fn_Record_Dump },
  90. #define END_LKR_EXTN_TABLE() \
  91. { 0, 0, 0, 0}, \
  92. };
  93. #endif // LKR_CUST_DECLARE_TABLE
  94. BEGIN_LKR_EXTN_TABLE()
  95. LKR_EXTN_DECLARE(?,
  96. Dummy_LKHT_Dump,
  97. Dummy_LKLH_Dump,
  98. Dummy_Record_Dump)
  99. LKR_EXTN_DECLARE(wordhash,
  100. CWordHash_LKHT_Dump,
  101. CWordHash_LKLH_Dump,
  102. CWordHash_RecordDump)
  103. LKR_EXTN_DECLARE(string,
  104. CStringTest_TableDump,
  105. Dummy_LKLH_Dump,
  106. CTest_RecordDump)
  107. LKR_EXTN_DECLARE(NumberSet,
  108. CNumberSet_TableDump,
  109. Dummy_LKLH_Dump,
  110. int_RecordDump)
  111. LKR_EXTN_DECLARE(number,
  112. CNumberTest_TableDump,
  113. Dummy_LKLH_Dump,
  114. CTest_RecordDump)
  115. LKR_EXTN_DECLARE(VWtest,
  116. CWchar_TableDump,
  117. Dummy_LKLH_Dump,
  118. Vwrecord_RecordDump)
  119. END_LKR_EXTN_TABLE()