/[lwip]/lwip/src/include/lwip/debug.h
ViewVC logotype

Diff of /lwip/src/include/lwip/debug.h

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.25 by kieranm, Tue Jun 10 10:45:29 2003 UTC revision 1.25.2.1 by jani, Tue Nov 4 12:08:06 2003 UTC
# Line 61  Line 61 
61  /** flag for LWIP_DEBUGF to halt after printing this debug message */  /** flag for LWIP_DEBUGF to halt after printing this debug message */
62  #define DBG_HALT    0x08U  #define DBG_HALT    0x08U
63    
64  #ifdef LWIP_DEBUG  #ifndef LWIP_NOASSERT
 # ifndef LWIP_NOASSERT  
65  #  define LWIP_ASSERT(x,y) do { if(!(y)) LWIP_PLATFORM_ASSERT(x); } while(0)  #  define LWIP_ASSERT(x,y) do { if(!(y)) LWIP_PLATFORM_ASSERT(x); } while(0)
66  # else  #else
67  #  define LWIP_ASSERT(x,y)  #  define LWIP_ASSERT(x,y)
68  # endif  #endif
69    
70    #ifdef LWIP_DEBUG
71  /** print debug message only if debug message type is enabled...  /** print debug message only if debug message type is enabled...
72   *  AND is of correct type AND is at least DBG_LEVEL   *  AND is of correct type AND is at least DBG_LEVEL
73   */   */
74  #  define LWIP_DEBUGF(debug,x) do { if (((debug) & DBG_ON) && ((debug) & DBG_TYPES_ON) && (((debug) & DBG_MASK_LEVEL) >= DBG_MIN_LEVEL)) { LWIP_PLATFORM_DIAG(x); if ((debug) & DBG_HALT) while(1); } } while(0)  #  define LWIP_DEBUGF(debug,x) do { if (((debug) & DBG_ON) && ((debug) & DBG_TYPES_ON) && (((debug) & DBG_MASK_LEVEL) >= DBG_MIN_LEVEL)) { LWIP_PLATFORM_DIAG(x); if ((debug) & DBG_HALT) while(1); } } while(0)
75  #  define LWIP_ERROR(x)   do { LWIP_PLATFORM_DIAG(x); } while(0)    #  define LWIP_ERROR(x)   do { LWIP_PLATFORM_DIAG(x); } while(0)  
76  #else /* LWIP_DEBUG */  #else /* LWIP_DEBUG */
 #  define LWIP_ASSERT(x,y)  
77  #  define LWIP_DEBUGF(debug,x)  #  define LWIP_DEBUGF(debug,x)
78  #  define LWIP_ERROR(x)    #  define LWIP_ERROR(x)  
79  #endif /* LWIP_DEBUG */  #endif /* LWIP_DEBUG */

Legend:
Removed from v.1.25  
changed lines
  Added in v.1.25.2.1

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26