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.

95 lines
1.6 KiB

  1. /*++
  2. Copyright (c) 1997 Microsoft Corporation
  3. Module Name:
  4. acpilock.h
  5. Abstract:
  6. This moulde is the header for acpilock.c
  7. Author:
  8. Environment:
  9. NT Kernel Mode Driver Only
  10. --*/
  11. #ifndef _ACPILOCK_H_
  12. #define _ACPILOCK_H_
  13. //
  14. // Global lock request structure is in acpiioct.h
  15. // Used only if the requestor must wait for the lock.
  16. // Cannot grow beyond 4 DWORDs
  17. //
  18. // An IRP is queued (LockContext == Irp)
  19. #define ACPI_GL_QTYPE_IRP 1
  20. // Internal, LockContext == CallBack
  21. #define ACPI_GL_QTYPE_INTERNAL 2
  22. typedef struct _ACPI_GLOBAL_LOCK {
  23. PVOID LockContext;
  24. USHORT Type;
  25. USHORT Depth;
  26. LIST_ENTRY ListEntry;
  27. } ACPI_GLOBAL_LOCK, *PACPI_GLOBAL_LOCK;
  28. //
  29. // Public interfaces
  30. //
  31. NTSTATUS
  32. EXPORT
  33. GlobalLockEventHandler(
  34. ULONG EventType,
  35. ULONG What,
  36. ULONG dwParam,
  37. PFNAA pfnCallBack,
  38. PVOID pvCtxt
  39. );
  40. //
  41. // Internal interfaces
  42. //
  43. NTSTATUS
  44. ACPIAsyncAcquireGlobalLock(
  45. PACPI_GLOBAL_LOCK Request
  46. );
  47. NTSTATUS
  48. ACPIReleaseGlobalLock(
  49. PVOID OwnerContext
  50. );
  51. //
  52. // Hardware Interfaces
  53. //
  54. BOOLEAN
  55. ACPIAcquireHardwareGlobalLock(
  56. PULONG GlobalLock
  57. );
  58. VOID
  59. ACPIReleaseHardwareGlobalLock(
  60. VOID
  61. );
  62. VOID
  63. ACPIHardwareGlobalLockReleased (
  64. VOID
  65. );
  66. //
  67. // Utility procedures
  68. //
  69. VOID
  70. ACPIStartNextGlobalLockRequest (
  71. VOID
  72. );
  73. #endif