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.

166 lines
3.4 KiB

  1. /*++
  2. Copyright (c) 1995 Microsoft Corporation
  3. Module Name:
  4. net\routing\ipx\sap\timermgr.h
  5. Abstract:
  6. Timer queue manager for SAP agent. Header file
  7. Author:
  8. Vadim Eydelman 05-15-1995
  9. Revision History:
  10. --*/
  11. #ifndef _SAP_TIMERMGR_
  12. #define _SAP_TIMERMGR_
  13. // Timer request parameters
  14. typedef struct _TM_PARAM_BLOCK TM_PARAM_BLOCK, *PTM_PARAM_BLOCK;
  15. struct _TM_PARAM_BLOCK {
  16. LIST_ENTRY link;
  17. BOOL (*ExpirationCheckProc) (PTM_PARAM_BLOCK, PVOID);
  18. DWORD dueTime;
  19. };
  20. /*++
  21. *******************************************************************
  22. C r e a t e T i m e r Q u e u e
  23. Routine Description:
  24. Allocates resources for timer queue
  25. Arguments:
  26. wakeObject - sync object, to be signalled when
  27. timer manager needs a shot to process its queue
  28. Return Value:
  29. NO_ERROR - resources were allocated successfully
  30. other - reason of failure (windows error code)
  31. *******************************************************************
  32. --*/
  33. DWORD
  34. IpxSapCreateTimerQueue (
  35. HANDLE *wakeObject
  36. );
  37. /*++
  38. *******************************************************************
  39. D e l e t e T i m e r Q u e u e
  40. Routine Description:
  41. Releases all resources associated with timer queue
  42. Arguments:
  43. None
  44. Return Value:
  45. NO_ERROR - operation completed OK
  46. *******************************************************************
  47. --*/
  48. VOID
  49. IpxSapDeleteTimerQueue (
  50. void
  51. );
  52. /*++
  53. *******************************************************************
  54. E x p i r e T i m e r Q u e u e
  55. Routine Description:
  56. Expires (completes) all requests in timer queue
  57. Arguments:
  58. None
  59. Return Value:
  60. None
  61. *******************************************************************
  62. --*/
  63. VOID
  64. ExpireTimerQueue (
  65. void
  66. );
  67. /*++
  68. *******************************************************************
  69. E x p i r e L R R e q u s t s
  70. Routine Description:
  71. Expires (completes) Low Resolution timer requests
  72. that return true from expiration check routine
  73. Arguments:
  74. context - context to pass to expiration check routine
  75. Return Value:
  76. None
  77. *******************************************************************
  78. --*/
  79. VOID
  80. ExpireLRRequests (
  81. PVOID context
  82. );
  83. /*++
  84. *******************************************************************
  85. P r o c e s s T i m e r Q u e u e
  86. Routine Description:
  87. Process timer queues and moves expired requests to completion queue
  88. This routine should be called when wake object is signalled
  89. Arguments:
  90. None
  91. Return Value:
  92. None
  93. *******************************************************************
  94. --*/
  95. VOID
  96. ProcessTimerQueue (
  97. void
  98. );
  99. /*++
  100. *******************************************************************
  101. A d d H R T i m e r R e q u e s t
  102. Routine Description:
  103. Enqueues request for hi-res timer (delay in order of msec)
  104. Arguments:
  105. treq - timer parameter block: dueTime field must be set
  106. Return Value:
  107. None
  108. *******************************************************************
  109. --*/
  110. VOID
  111. AddHRTimerRequest (
  112. PTM_PARAM_BLOCK item
  113. );
  114. /*++
  115. *******************************************************************
  116. A d d L R T i m e r R e q u e s t
  117. Routine Description:
  118. Enqueues request for lo-res timer (delay in order of sec)
  119. Arguments:
  120. treq - timer parameter block: dueTime field must be set
  121. Return Value:
  122. None
  123. *******************************************************************
  124. --*/
  125. VOID
  126. AddLRTimerRequest (
  127. PTM_PARAM_BLOCK item
  128. );
  129. #endif