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.

82 lines
1.7 KiB

  1. /*++
  2. Copyright (c) 2000 Microsoft Corporation
  3. Module Name:
  4. idletask.h
  5. Abstract:
  6. This module contains the API and type declaration to support
  7. idle/background tasks.
  8. Author:
  9. Dave Fields (davidfie) 26-July-1998
  10. Cenk Ergan (cenke) 14-June-2000
  11. Revision History:
  12. --*/
  13. #ifndef _IDLETASK_H_
  14. #define _IDLETASK_H_
  15. #ifdef __cplusplus
  16. extern "C" {
  17. #endif
  18. //
  19. // Idle task identifier, used as aid in tracking registered idle
  20. // tasks, especially for debugging. Contact code's maintainers if you
  21. // wish to use idletask functionality.
  22. //
  23. // FUTURE-2002/03/26-ScottMa -- Consider applying the [v1_enum] MIDL
  24. // attribute to the following enumeration for increased efficiency.
  25. typedef enum _IT_IDLE_TASK_ID {
  26. ItPrefetcherMaintenanceIdleTaskId,
  27. ItSystemRestoreIdleTaskId,
  28. ItOptimalDiskLayoutTaskId,
  29. ItPrefetchDirectoryCleanupTaskId,
  30. ItDiskMaintenanceTaskId,
  31. ItHelpSvcDataCollectionTaskId,
  32. ItMaxIdleTaskId
  33. } IT_IDLE_TASK_ID, *PIT_IDLE_TASK_ID;
  34. #ifndef MIDL_PASS
  35. DWORD
  36. RegisterIdleTask (
  37. IN IT_IDLE_TASK_ID IdleTaskId,
  38. OUT HANDLE *ItHandle,
  39. OUT HANDLE *StartEvent,
  40. OUT HANDLE *StopEvent
  41. );
  42. // ISSUE-2002/03/26-ScottMa -- The parameters to the UnregisterIdleTask
  43. // function should be IN/OUT so that they can be set to NULL be the client
  44. // side function after the RPC completes. This helps reduce the risk of
  45. // the app accidentally double-unregistering.
  46. DWORD
  47. UnregisterIdleTask (
  48. IN HANDLE ItHandle,
  49. IN HANDLE StartEvent,
  50. IN HANDLE StopEvent
  51. );
  52. DWORD
  53. ProcessIdleTasks (
  54. VOID
  55. );
  56. #endif // MIDL_PASS
  57. #ifdef __cplusplus
  58. }
  59. #endif
  60. #endif // _IDLETASK_H_