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.

93 lines
2.4 KiB

  1. /*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  2. Copyright (c) 1989-1999 Microsoft Corporation
  3. Module Name:
  4. opinfo.cxx
  5. Abstract:
  6. Contains the implementations of the optimisation analysis information
  7. classes.
  8. Notes:
  9. Author:
  10. ----------------------------------------------------------------------------*/
  11. /****************************************************************************
  12. * include files
  13. ***************************************************************************/
  14. #include "allana.hxx"
  15. #pragma hdrstop
  16. /****************************************************************************
  17. * local definitions
  18. ***************************************************************************/
  19. /****************************************************************************
  20. * local data
  21. ***************************************************************************/
  22. /****************************************************************************
  23. * externs
  24. ***************************************************************************/
  25. /****************************************************************************
  26. * SU_PROPERTY implementation
  27. ***************************************************************************/
  28. USE_COUNT
  29. SU_OPTIM_INFO::IncrInUsage()
  30. /*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  31. Routine Description:
  32. Increment the [in] directional usage of this type.
  33. Arguments:
  34. None.
  35. Return Value:
  36. The final incremented usage.
  37. Notes:
  38. If the incremented usage is above the threshold, set it to the threshold
  39. value itself.
  40. ----------------------------------------------------------------------------*/
  41. {
  42. if( ++InUsageCount >= USAGE_THRESHOLD )
  43. InUsageCount = USAGE_THRESHOLD;
  44. return InUsageCount;
  45. }
  46. USE_COUNT
  47. SU_OPTIM_INFO::IncrOutUsage()
  48. /*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  49. Routine Description:
  50. Increment the [out] directional usage of this type.
  51. Arguments:
  52. None.
  53. Return Value:
  54. The final incremented usage.
  55. Notes:
  56. If the incremented usage is above the threshold, set it to the threshold
  57. value itself.
  58. ----------------------------------------------------------------------------*/
  59. {
  60. if( ++InUsageCount >= USAGE_THRESHOLD )
  61. InUsageCount = USAGE_THRESHOLD;
  62. return InUsageCount;
  63. }