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.

85 lines
1.0 KiB

  1. /*++
  2. Copyright (c) 1997 Microsoft Corporation
  3. Module Name:
  4. sched.h
  5. Abstract:
  6. Scheduling time-based work items
  7. Author:
  8. Vlad Sadovsky (vlads) 31-Jan-1997
  9. Environment:
  10. User Mode - Win32
  11. Revision History:
  12. 31-Jan-1997 VladS created
  13. --*/
  14. # ifndef _SCHED_H_
  15. # define _SCHED_H_
  16. #include <windows.h>
  17. //
  18. // Scheduler stuff
  19. //
  20. typedef
  21. VOID
  22. (* PFN_SCHED_CALLBACK)(
  23. VOID * pContext
  24. );
  25. BOOL
  26. SchedulerInitialize(
  27. VOID
  28. );
  29. VOID
  30. SchedulerTerminate(
  31. VOID
  32. );
  33. DWORD
  34. ScheduleWorkItem(
  35. PFN_SCHED_CALLBACK pfnCallback,
  36. PVOID pContext,
  37. DWORD msecTime,
  38. HANDLE hEvent = NULL,
  39. int nPriority = THREAD_PRIORITY_NORMAL
  40. );
  41. BOOL
  42. RemoveWorkItem(
  43. DWORD pdwCookie
  44. );
  45. BOOL
  46. SchedulerSetPauseState(
  47. BOOL fNewState
  48. );
  49. #ifdef DEBUG
  50. VOID
  51. DebugDumpScheduleList(
  52. LPCTSTR pszId = NULL
  53. );
  54. #endif
  55. # endif // _SCHED_H_