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.

88 lines
1.8 KiB

  1. /*++
  2. Copyright (c) 1991 Microsoft Corporation
  3. Module Name:
  4. bowtimer.h
  5. Abstract:
  6. This module declares definitions dealing with bowser timers.
  7. Author:
  8. Larry Osterman (larryo) 6-May-1991
  9. Revision History:
  10. 6-May-1991 larryo
  11. Created
  12. --*/
  13. #ifndef _BOWTIMER_
  14. #define _BOWTIMER_
  15. struct _TRANSPORT;
  16. typedef
  17. NTSTATUS
  18. (*PBOWSER_TIMER_ROUTINE)(
  19. IN struct _TRANSPORT *Transport
  20. );
  21. // BOWSER_TIMER flags:
  22. // Canceled is TRUE when a timer is cancelled but is already in
  23. // the dpc queue.
  24. //
  25. // AlreadySet is used to ensure we stop the timer before restarting it.
  26. //
  27. // Reset is set to TRUE when a timer has been stopped and restarted while
  28. // in the dpc queue. The Lock is used to ensure ordered access.
  29. // Note: a timer can be stopped and reset multiple times before it gets
  30. // to the front of the dpc queue.
  31. //
  32. typedef struct _BOWSER_TIMER {
  33. KDPC Dpc;
  34. KTIMER Timer;
  35. KSPIN_LOCK Lock;
  36. KEVENT TimerInactiveEvent;
  37. PBOWSER_TIMER_ROUTINE TimerRoutine;
  38. PVOID TimerContext;
  39. LARGE_INTEGER Timeout;
  40. WORK_QUEUE_ITEM WorkItem;
  41. BOOLEAN AlreadySet;
  42. BOOLEAN Initialized;
  43. BOOLEAN Canceled;
  44. BOOLEAN SetAgain;
  45. } BOWSER_TIMER, *PBOWSER_TIMER;
  46. VOID
  47. BowserInitializeTimer(
  48. IN PBOWSER_TIMER Timer
  49. );
  50. VOID
  51. BowserStopTimer (
  52. IN PBOWSER_TIMER Timer
  53. );
  54. VOID
  55. BowserUninitializeTimer(
  56. IN PBOWSER_TIMER Timer
  57. );
  58. BOOLEAN
  59. BowserStartTimer (
  60. IN PBOWSER_TIMER Timer,
  61. IN ULONG MillisecondsToExpireTimer,
  62. IN PBOWSER_TIMER_ROUTINE TimerExpirationRoutine,
  63. IN PVOID Context
  64. );
  65. #endif // _BOWTIMER_