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.

66 lines
1.6 KiB

  1. /*++
  2. Copyright (c) 1989-2001 Microsoft Corporation
  3. Module Name:
  4. debug.h
  5. Abstract:
  6. Software Tracing
  7. Author:
  8. Jiandong Ruan
  9. Revision History:
  10. --*/
  11. #ifndef __DEBUG_H__
  12. #define __DEBUG_H__
  13. #if DBG
  14. #define SmbPrint(x,y) \
  15. if (WPP_MASK(WPP_BIT_ ## x) & SmbCfg.DebugFlag) { \
  16. DbgPrint y; \
  17. }
  18. #else
  19. # define SmbPrint(x,y)
  20. #endif
  21. #if DBG
  22. #define TODO(x) \
  23. do { \
  24. SmbPrint(SMB_TRACE_TODO, (x " %d of %s\n", __LINE__, __FILE__)); \
  25. } while(0)
  26. #else
  27. #define TODO(x)
  28. #endif
  29. #define BREAK_WHEN_TAKE() \
  30. ASSERTMSG("This is a code path not covered in my sanity test. This break has 2 purposes:\n" \
  31. "\t1. indicating that we does get covered.\n" \
  32. "\t2. giving me a chance to check the internal state.\n" \
  33. "Please contact JRuan before you hit 'g'. ", 0);
  34. /*
  35. * Pool Tags
  36. */
  37. #define CLIENT_OBJECT_POOL_TAG 'cBMS'
  38. #define CONNECT_OBJECT_POOL_TAG 'dBMS'
  39. #define SMB_TCP_DEVICE_POOL_TAG 'IBMS'
  40. #define SMB_POOL_REGISTRY 'rBMS'
  41. #define TCP_CONTEXT_POOL_TAG 'tBMS'
  42. #define NBT_HEADER_TAG 'hTBN'
  43. #define BAIL_OUT_ON_ERROR(status) \
  44. do { \
  45. if (!NT_SUCCESS(status)) { \
  46. goto cleanup; \
  47. } \
  48. } while(0)
  49. #endif