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.

37 lines
1.3 KiB

  1. /*==========================================================================*\
  2. Module: perf.h
  3. Copyright Microsoft Corporation 1998, All Rights Reserved.
  4. Author: WayneC, MinYang
  5. Descriptions: Interface functions accessing perf object instances.
  6. Modified: Awetmore - for NTFSDRV usage
  7. \*==========================================================================*/
  8. #ifndef __PERF_H__
  9. #define __PERF_H__
  10. #include "snprflib.h"
  11. #include "ntfsdrct.h"
  12. #define DEFAULT_PERF_UPDATE_INTERVAL 1000 // milliseconds
  13. #define IncCtr(ppoi,x) { LPDWORD pDword; if (ppoi) { pDword = ppoi->GetDwordCounter(x); if (pDword) InterlockedIncrement((PLONG)pDword); }}
  14. #define DecCtr(ppoi,x) { LPDWORD pDword; if (ppoi) { pDword = ppoi->GetDwordCounter(x); if (pDword) InterlockedDecrement((PLONG)pDword); }}
  15. #define AddCtr(ppoi,x,y) { LPDWORD pDword; if (ppoi) { pDword = ppoi->GetDwordCounter(x); if (pDword) InterlockedExchangeAdd((PLONG)pDword, (LONG)y); }}
  16. #define SetCtr(ppoi,x,y) { LPDWORD pDword; if (ppoi) { pDword = ppoi->GetDwordCounter(x); if (pDword) (*pDword)=y; } }
  17. BOOL InitializePerformanceStatistics ();
  18. void ShutdownPerformanceStatistics ();
  19. PerfObjectInstance * CreatePerfObjInstance (LPCWSTR pwstrInstanceName);
  20. extern BOOL g_fPerfCounters;
  21. #endif // __PERF_H__