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.

78 lines
3.8 KiB

  1. /**INC+**********************************************************************/
  2. /* */
  3. /* ndcgperf.h */
  4. /* */
  5. /* DC-Groupware performance monitoring - Windows NT specific header. */
  6. /* */
  7. /* Copyright(c) Microsoft 1996-7 */
  8. /* */
  9. /****************************************************************************/
  10. /* Changes: */
  11. /* */
  12. /* 10Sep96 AK SFR0569 Created for performance monitoring */
  13. /* 22Jan97 AK SFR1165 Add PRF_SET_RAWCOUNT */
  14. /* 05Feb97 TH SFR1373 Get C++ build working */
  15. /* */
  16. /**INC-**********************************************************************/
  17. #ifndef _H_NDCGPERF
  18. #define _H_NDCGPERF
  19. #ifdef VER_CPP
  20. extern "C" {
  21. #endif /* VER_CPP */
  22. /****************************************************************************/
  23. /* */
  24. /* INCLUDES */
  25. /* */
  26. /****************************************************************************/
  27. /****************************************************************************/
  28. /* Include the auto-generated header file containing constant definitions */
  29. /****************************************************************************/
  30. #include <nprfincl.h>
  31. #define DC_NO_PERFORMANCE_MONITOR
  32. /****************************************************************************/
  33. /* Import the shared data segment from the Performance DLL */
  34. /****************************************************************************/
  35. __declspec(dllimport) DWORD prfSharedDataBlock[1024];
  36. /****************************************************************************/
  37. /* Define the Performance Monitoring macros. */
  38. /* Note that the constants are defined in nprfincl.h as 2, 4, 6, ... */
  39. /* The offsets into the shared data are 0, 8, 16, etc */
  40. /****************************************************************************/
  41. #ifndef DC_NO_PERFORMANCE_MONITOR
  42. #define PRF_INC_COUNTER(x) \
  43. (*((DWORD *)(((PDCINT8)prfSharedDataBlock) + sizeof(DWORD)*((x)-2))))++;
  44. #define PRF_ADD_COUNTER(x,n) \
  45. (*((DWORD *)(((PDCINT8)prfSharedDataBlock) + sizeof(DWORD)*((x)-2))))+=(n);
  46. #define PRF_SET_RAWCOUNT(x,n) \
  47. (*((DWORD *)(((PDCINT8)prfSharedDataBlock) + sizeof(DWORD)*((x)-2))))=(n);
  48. /****************************************************************************/
  49. /* Timers currently not implemented. */
  50. /****************************************************************************/
  51. #define PRF_TIMER_START(x)
  52. #define PRF_TIMER_STOP(x)
  53. #else /* ..DC_NO_PERFORMANCE_MONITOR.. */
  54. #define PRF_INC_COUNTER(x)
  55. #define PRF_ADD_COUNTER(x,n)
  56. #define PRF_SET_RAWCOUNT(x,n)
  57. #define PRF_TIMER_START(x)
  58. #define PRF_TIMER_STOP(x)
  59. #endif /* DC_NO_PERFORMANCE_MONITOR */
  60. #ifdef VER_CPP
  61. }
  62. #endif /* VER_CPP */
  63. #endif /* _H_NDCGPERF */