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.

115 lines
2.7 KiB

  1. /*++
  2. Copyright (c) 1995-1996 Microsoft Corporation
  3. Module Name :
  4. auxctrs.h
  5. Abstract:
  6. This module defines the auxiliary counters for Internet Common Services.
  7. Author:
  8. Murali R. Krishnan ( MuraliK ) 02-Apr-1996
  9. Environment:
  10. Windows NT - User Mode
  11. Project:
  12. Internet Services Common DLL
  13. Revision History:
  14. --*/
  15. # ifndef _IIS_AUX_COUNTERS_HXX_
  16. # define _IIS_AUX_COUNTERS_HXX_
  17. /************************************************************
  18. * Include Headers
  19. ************************************************************/
  20. /************************************************************
  21. * Symbolic Definitions
  22. ************************************************************/
  23. /*++
  24. Counters belong to two categories
  25. 1. Active Counter - one that counts up and down
  26. It is expected that this counter consists of the current
  27. active items and hence this should not be wildly high, unless
  28. there are large # of counted objects.
  29. 2. Cumulative Counters - counts values up and up
  30. This count value is used to measure the # of times event(s)
  31. related to this counter occurred.
  32. Naming Conventions:
  33. prefixes used are: Aac & Cac
  34. Aac - Active Auxiliary Counter
  35. Cac - Cumulative Auxiliary Counter
  36. Ac - Auxiliar Counter
  37. --*/
  38. typedef enum { // Ac - stands for Aux Counters.
  39. AacAtqContextsAlloced = 0,
  40. CacAtqContextsReused,
  41. CacAtqContextsCleanedup,
  42. CacAtqPrepareContexts,
  43. CacAtqPendingAcceptExScans,
  44. CacAtqContextsTimedOut,
  45. CacAtqWaitsForTimeout,
  46. CacAtqProcWhenTimeout, // in processing when timeout occurred.
  47. AacIISMaxCounters // sentinel counter
  48. } ENUM_IIS_AUX_COUNTER;
  49. #ifdef IIS_AUX_COUNTERS
  50. # define NUM_AUX_COUNTERS (AacIISMaxCounters)
  51. //
  52. // Macros for operating on these counters
  53. //
  54. # define AcIncrement( acCounter) \
  55. (((acCounter) < NUM_AUX_COUNTERS) ? \
  56. g_AuxCounters[acCounter]++ : \
  57. 0)
  58. # define AcDecrement( acCounter) \
  59. (((acCounter) < NUM_AUX_COUNTERS) ? \
  60. g_AuxCounters[acCounter]-- : \
  61. 0)
  62. # define AcCounter( acCounter) \
  63. (((acCounter) < NUM_AUX_COUNTERS) ? g_AuxCounters[acCounter] : 0)
  64. extern LONG g_AuxCounters[];
  65. # else // IIS_AUX_COUNTERS
  66. # define NUM_AUX_COUNTERS (0)
  67. # define AcIncrement( acCounter) (0) /* do nothing */
  68. # define AcDecrement( acCounter) (0) /* do nothing */
  69. # define AcCounter ( acCounter) (0) /* do nothing */
  70. #endif // IIS_AUX_COUNTERS
  71. # endif // _IIS_AUX_COUNTERS_HXX_
  72. /************************ End of File ***********************/