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.

43 lines
615 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. PossibleStartCore,
  15. EOL
  16. };
  17. class CSched
  18. {
  19. private:
  20. DWORD m_dwDue[EOL];
  21. public:
  22. CSched();
  23. void SetWorkItem(JobType jt, DWORD dwMsFromNow);
  24. DWORD GetWaitPeriod();
  25. bool IsWorkItemDue(JobType jt);
  26. void ClearWorkItem(JobType jt);
  27. void StartCoreIfEssNeeded();
  28. };
  29. #endif