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.

131 lines
1.9 KiB

  1. #ifndef _OMP_H
  2. #define _OMP_H
  3. /*++
  4. Copyright (c) 1996 Microsoft Corporation
  5. Module Name:
  6. omp.h
  7. Abstract:
  8. Private data structures and procedure prototypes for
  9. the Object Manager subcomponent of the NT Cluster
  10. Service
  11. Author:
  12. John Vert (jvert) 16-Feb-1996
  13. Revision History:
  14. --*/
  15. #include "service.h"
  16. #define LOG_CURRENT_MODULE LOG_MODULE_OM
  17. #define ENUM_GROW_SIZE 5
  18. //
  19. // Data structures for the ObjectTypes
  20. //
  21. extern POM_OBJECT_TYPE OmpObjectTypeTable[ObjectTypeMax];
  22. extern CRITICAL_SECTION OmpObjectTypeLock;
  23. //
  24. // Macros
  25. //
  26. //
  27. // Find the object type for an object
  28. //
  29. #define OmpObjectType(pObject) (((POM_HEADER)OmpObjectToHeader(pObject))->ObjectType)
  30. //
  31. // Dereference object header
  32. //
  33. #if OM_TRACE_OBJREF
  34. DWORD
  35. OmpDereferenceHeader(
  36. IN POM_HEADER Header
  37. );
  38. #else
  39. #define OmpDereferenceHeader(pOmHeader) (InterlockedDecrement(&(pOmHeader)->RefCount) == 0)
  40. #endif
  41. //
  42. // Search object list.
  43. //
  44. POM_HEADER
  45. OmpFindIdInList(
  46. IN PLIST_ENTRY ListHead,
  47. IN LPCWSTR Id
  48. );
  49. POM_HEADER
  50. OmpFindNameInList(
  51. IN PLIST_ENTRY ListHead,
  52. IN LPCWSTR Name
  53. );
  54. POM_NOTIFY_RECORD
  55. OmpFindNotifyCbInList(
  56. IN PLIST_ENTRY ListHead,
  57. IN OM_OBJECT_NOTIFYCB lpfnObjNotifyCb
  58. );
  59. //
  60. // Enumerate object list.
  61. //
  62. typedef BOOL (*OMP_ENUM_LIST_ROUTINE)(
  63. IN PVOID Context1,
  64. IN PVOID Context2,
  65. IN PVOID Object,
  66. IN LPCWSTR Name
  67. );
  68. VOID
  69. OmpEnumerateList(
  70. IN PLIST_ENTRY ListHead,
  71. IN OMP_ENUM_LIST_ROUTINE EnumerationRoutine,
  72. IN PVOID Context1,
  73. IN PVOID Context2
  74. );
  75. DWORD OmpGetCbList(
  76. IN PVOID pObject,
  77. OUT POM_NOTIFY_RECORD *ppNotifyRecList,
  78. OUT LPDWORD pdwCount
  79. );
  80. //
  81. // object logging routines
  82. //
  83. VOID
  84. OmpOpenObjectLog(
  85. VOID
  86. );
  87. VOID
  88. OmpLogPrint(
  89. LPWSTR FormatString,
  90. ...
  91. );
  92. VOID
  93. OmpLogStartRecord(
  94. VOID
  95. );
  96. VOID
  97. OmpLogStopRecord(
  98. VOID
  99. );
  100. #endif //_OMP_H