Source code of Windows XP (NT5)
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.

62 lines
1.1 KiB

  1. /*++
  2. Copyright (c) 2000 Microsoft Corporation. All rights reserved.
  3. Module Name:
  4. TunePrefix.h
  5. Abstract:
  6. This module includes tuning macros intended for use with PREfix.
  7. Author:
  8. Tim Fleehart [timf] 20000215
  9. --*/
  10. #ifndef _TUNEPREFIX_H_INCLUDED_
  11. # define _TUNEPREFIX_H_INCLUDED_
  12. # ifdef _PREFIX_
  13. //
  14. // The PREfix parser defines _PREFIX_, this allows us to create some tuning
  15. // macros.
  16. //
  17. // PREfixExit will be hooked by the PREfix simulator as an "exit_function"
  18. // so we won't continue simulation on a path past this function.
  19. //
  20. __inline
  21. void
  22. PREfixExit(
  23. void
  24. )
  25. {
  26. ;
  27. }
  28. //
  29. // reason should be a quoted string that explains why the condition can't
  30. // happen as an aid to code-reading.
  31. //
  32. # define PREFIX_ASSUME(condition, reason) \
  33. { if (!(condition)) { PREfixExit(); } }
  34. # define PREFIX_NOT_REACHED(reason) PREfixExit()
  35. # else
  36. // PREFIX_* tuning macros should have no effect when _PREFIX_ isn't
  37. // already defined.
  38. # define PREFIX_ASSUME(condition, reason)
  39. # define PREFIX_NOT_REACHED(reason)
  40. # endif
  41. #endif // _TUNEPREFIX_H_INCLUDED_