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.

70 lines
1.4 KiB

  1. /*++
  2. Copyright (c) 1995 Microsoft Corporation
  3. Module Name:
  4. cpuassrt.h
  5. Abstract:
  6. This include file defines the assertion mechanism for the compiling
  7. CPU.
  8. Author:
  9. Barry Bond (barrybo) creation-date 07-Aug-1995
  10. Revision History:
  11. --*/
  12. #ifndef _CPUASSRT_H_
  13. #define _CPUASSRT_H_
  14. // This function is defined in fraglib\fraginit.c
  15. VOID
  16. CpuStartDebugger(
  17. VOID
  18. );
  19. #if DBG
  20. #undef ASSERTNAME
  21. #define ASSERTNAME static char szModule[] = __FILE__;
  22. // This function is defined in fraglib\fraginit.c
  23. VOID
  24. DoAssert(
  25. PSZ exp,
  26. PSZ msg,
  27. PSZ mod,
  28. INT line
  29. );
  30. #define CPUASSERT(exp) \
  31. { \
  32. if (!(exp)) { \
  33. DoAssert( #exp , NULL, szModule, __LINE__); \
  34. } \
  35. }
  36. #define CPUASSERTMSG(exp,msg) \
  37. { \
  38. if (!(exp)) { \
  39. DoAssert( #exp , (msg), szModule, __LINE__); \
  40. } \
  41. }
  42. #else //!DBG
  43. #define ASSERTNAME
  44. #define CPUASSERT(exp)
  45. #define CPUASSERTMSG(exp,msg)
  46. #endif //!DBG
  47. #endif