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.

91 lines
1.7 KiB

  1. /*++
  2. Copyright (c) 1992 Microsoft Corporation
  3. Module Name:
  4. lmmgmt.c
  5. Abstract:
  6. Provides the maintenance functions for the log manager.
  7. Author:
  8. Sunita Shrivastava (sunitas) 10-Nov-1995
  9. Revision History:
  10. --*/
  11. #include "service.h"
  12. #include "lmp.h"
  13. /****
  14. @doc EXTERNAL INTERFACES CLUSSVC LM
  15. ****/
  16. /****
  17. @func DWORD | LmInitialize| It initializes structures for log file
  18. management and creates a timer thread to process timer activities.
  19. @rdesc ERROR_SUCCESS if successful. Win32 error code if something horrible happened.
  20. @comm This function is called when the cluster components are initialized.
  21. @xref <f LmShutdown> <f ClTimerThread>
  22. ****/
  23. DWORD
  24. LmInitialize()
  25. {
  26. DWORD dwError = ERROR_SUCCESS;
  27. DWORD dwThreadId;
  28. //we need to create a thread to general log management
  29. //later this may be used by other clussvc client components
  30. ClRtlLogPrint(LOG_NOISE,
  31. "[LM] LmInitialize Entry. \r\n");
  32. if ((dwError = TimerActInitialize()) != ERROR_SUCCESS)
  33. {
  34. goto FnExit;
  35. }
  36. FnExit:
  37. return(dwError);
  38. }
  39. /****
  40. @func DWORD | LmShutdown | Deinitializes the Log manager.
  41. @rdesc ERROR_SUCCESS if successful. Win32 error code if something horrible happened.
  42. @comm This function notifies the timer thread to shutdown down and closes
  43. all resources associated with timer activity management.
  44. @xref <f LmInitialize>
  45. ****/
  46. DWORD
  47. LmShutdown(
  48. )
  49. {
  50. ClRtlLogPrint(LOG_NOISE,
  51. "[LM] LmShutDown : Entry \r\n");
  52. TimerActShutdown();
  53. ClRtlLogPrint(LOG_NOISE,
  54. "[LM] LmShutDown : Exit\r\n");
  55. //clean up the activity structure
  56. return(ERROR_SUCCESS);
  57. }