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.

71 lines
1.3 KiB

  1. /*++
  2. Copyright (c) 1998-1999 Microsoft Corporation
  3. Module Name:
  4. event.h
  5. Abstract:
  6. contains prototypes for functions in event.c
  7. Author:
  8. Paul McDaniel (paulmcd) 01-March-2000
  9. Revision History:
  10. --*/
  11. #ifndef _STATS_H_
  12. #define _STATS_H_
  13. #if DBG
  14. //
  15. // Structure used to track SR statistics
  16. //
  17. typedef struct _SR_STATS
  18. {
  19. ULONG TotalContextSearches;
  20. ULONG TotalContextFound;
  21. ULONG TotalContextCreated;
  22. ULONG TotalContextTemporary;
  23. ULONG TotalContextIsEligible;
  24. ULONG TotalContextDirectories;
  25. ULONG TotalContextDirectoryQuerries;
  26. ULONG TotalContextDuplicateFrees;
  27. ULONG TotalContextCtxCallbackFrees;
  28. ULONG TotalContextNonDeferredFrees;
  29. ULONG TotalContextDeferredFrees;
  30. ULONG TotalContextDeleteAlls;
  31. ULONG TotalContextsNotSupported;
  32. ULONG TotalContextsNotFoundInStreamList;
  33. ULONG TotalHardLinkCreates;
  34. } SR_STATS, *PSR_STATS;
  35. extern SR_STATS SrStats;
  36. //
  37. // Atomically increment the value
  38. //
  39. #define INC_STATS(field) InterlockedIncrement( &SrStats.field );
  40. #define INC_LOCAL_STATS(var) ((var)++)
  41. #else
  42. //
  43. // NON-DEBUG version of macros
  44. //
  45. #define INC_STATS(field) ((void)0)
  46. #define INC_LOCAL_STATS(var) ((void)0)
  47. #endif
  48. #endif // _STATS_H_