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.

89 lines
1.2 KiB

  1. /*++
  2. Copyright (c) 1999 Microsoft Corporation
  3. Module Name:
  4. vfpdlock.h
  5. Abstract:
  6. Detect deadlocks in arbitrary synchronization objects.
  7. Author:
  8. Jordan Tigani (jtigani) 2-May-2000
  9. Silviu Calinoiu (silviuc) 9-May-2000
  10. Revision History:
  11. --*/
  12. #ifndef _VFDLOCK_H_
  13. #define _VFDLOCK_H_
  14. VOID
  15. VfDeadlockDetectionInitialize(
  16. VOID
  17. );
  18. //
  19. // Resource types supported by deadlock verifier.
  20. //
  21. typedef enum _VI_DEADLOCK_RESOURCE_TYPE {
  22. ViDeadlockUnknown = 0,
  23. ViDeadlockMutex,
  24. ViDeadlockFastMutex,
  25. ViDeadlockTypeMaximum
  26. } VI_DEADLOCK_RESOURCE_TYPE, *PVI_DEADLOCK_RESOURCE_TYPE;
  27. //
  28. // Deadlock detection package initialization.
  29. //
  30. VOID
  31. ViDeadlockDetectionInitialize(
  32. );
  33. //
  34. // Resource interfaces
  35. //
  36. BOOLEAN
  37. ViDeadlockAddResource(
  38. IN PVOID Resource,
  39. IN VI_DEADLOCK_RESOURCE_TYPE Type
  40. );
  41. BOOLEAN
  42. ViDeadlockQueryAcquireResource(
  43. IN PVOID Resource,
  44. IN VI_DEADLOCK_RESOURCE_TYPE Type
  45. );
  46. VOID
  47. ViDeadlockAcquireResource(
  48. IN PVOID Resource,
  49. IN VI_DEADLOCK_RESOURCE_TYPE Type
  50. );
  51. VOID
  52. ViDeadlockReleaseResource(
  53. IN PVOID Resource
  54. );
  55. //
  56. // Used for resource garbage collection.
  57. //
  58. VOID
  59. ViDeadlockDeleteMemoryRange(
  60. IN PVOID Address,
  61. IN SIZE_T Size
  62. );
  63. #endif