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.

46 lines
627 B

  1. /*++
  2. Copyright (C) 1997-2001 Microsoft Corporation
  3. Module Name:
  4. SCHED.H
  5. Abstract:
  6. Declares the CSched class which is a crude scheduler.
  7. History:
  8. --*/
  9. #ifndef _sched_H_
  10. #define _sched_H_
  11. enum JobType {
  12. FirstCoreShutdown = 0,
  13. FinalCoreShutdown,
  14. CoreMaintLoad,
  15. FlushDB,
  16. PeriodicBackup,
  17. PossibleStartCore,
  18. EOL
  19. };
  20. class CSched
  21. {
  22. private:
  23. DWORD m_dwDue[EOL];
  24. public:
  25. CSched();
  26. void SetWorkItem(JobType jt, DWORD dwMsFromNow);
  27. DWORD GetWaitPeriod();
  28. bool IsWorkItemDue(JobType jt);
  29. void ClearWorkItem(JobType jt);
  30. void StartCoreIfEssNeeded();
  31. };
  32. #endif