ReactOS Fundraising Campaign 2012
 
€ 4,410 / € 30,000

Information | Donate

Home | Info | Community | Development | myReactOS | Contact Us

  1. Home
  2. Community
  3. Development
  4. myReactOS
  5. Fundraiser 2012

  1. Main Page
  2. Alphabetical List
  3. Data Structures
  4. Directories
  5. File List
  6. Data Fields
  7. Globals
  8. Related Pages

ReactOS Development > Doxygen

debug.h
Go to the documentation of this file.
00001 /*
00002  * Copyright (c) 2001-2004 Swedish Institute of Computer Science.
00003  * All rights reserved. 
00004  * 
00005  * Redistribution and use in source and binary forms, with or without modification, 
00006  * are permitted provided that the following conditions are met:
00007  *
00008  * 1. Redistributions of source code must retain the above copyright notice,
00009  *    this list of conditions and the following disclaimer.
00010  * 2. Redistributions in binary form must reproduce the above copyright notice,
00011  *    this list of conditions and the following disclaimer in the documentation
00012  *    and/or other materials provided with the distribution.
00013  * 3. The name of the author may not be used to endorse or promote products
00014  *    derived from this software without specific prior written permission. 
00015  *
00016  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED 
00017  * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 
00018  * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 
00019  * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 
00020  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT 
00021  * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 
00022  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
00023  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING 
00024  * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY 
00025  * OF SUCH DAMAGE.
00026  *
00027  * This file is part of the lwIP TCP/IP stack.
00028  * 
00029  * Author: Adam Dunkels <adam@sics.se>
00030  *
00031  */
00032 #ifndef __LWIP_DEBUG_H__
00033 #define __LWIP_DEBUG_H__
00034 
00035 #include "lwip/arch.h"
00036 
00043 #define LWIP_DBG_LEVEL_ALL     0x00
00044 #define LWIP_DBG_LEVEL_OFF     LWIP_DBG_LEVEL_ALL /* compatibility define only */
00045 #define LWIP_DBG_LEVEL_WARNING 0x01 /* bad checksums, dropped packets, ... */
00046 #define LWIP_DBG_LEVEL_SERIOUS 0x02 /* memory allocation failures, ... */
00047 #define LWIP_DBG_LEVEL_SEVERE  0x03
00048 #define LWIP_DBG_MASK_LEVEL    0x03
00049 
00051 #define LWIP_DBG_ON            0x80U
00052 
00053 #define LWIP_DBG_OFF           0x00U
00054 
00056 #define LWIP_DBG_TRACE         0x40U
00057 
00058 #define LWIP_DBG_STATE         0x20U
00059 
00060 #define LWIP_DBG_FRESH         0x10U
00061 
00062 #define LWIP_DBG_HALT          0x08U
00063 
00064 #ifndef LWIP_NOASSERT
00065 #define LWIP_ASSERT(message, assertion) do { if(!(assertion)) \
00066   LWIP_PLATFORM_ASSERT(message); } while(0)
00067 #else  /* LWIP_NOASSERT */
00068 #define LWIP_ASSERT(message, assertion) 
00069 #endif /* LWIP_NOASSERT */
00070 
00072 #ifndef LWIP_ERROR
00073 #define LWIP_ERROR(message, expression, handler) do { if (!(expression)) { \
00074   LWIP_PLATFORM_ASSERT(message); handler;}} while(0)
00075 #endif /* LWIP_ERROR */
00076 
00077 #ifdef LWIP_DEBUG
00078 
00081 #define LWIP_DEBUGF(debug, message) do { \
00082                                if ( \
00083                                    ((debug) & LWIP_DBG_ON) && \
00084                                    ((debug) & LWIP_DBG_TYPES_ON) && \
00085                                    ((s16_t)((debug) & LWIP_DBG_MASK_LEVEL) >= LWIP_DBG_MIN_LEVEL)) { \
00086                                  LWIP_PLATFORM_DIAG(message); \
00087                                  if ((debug) & LWIP_DBG_HALT) { \
00088                                    while(1); \
00089                                  } \
00090                                } \
00091                              } while(0)
00092 
00093 #else  /* LWIP_DEBUG */
00094 #define LWIP_DEBUGF(debug, message) 
00095 #endif /* LWIP_DEBUG */
00096 
00097 #endif /* __LWIP_DEBUG_H__ */
00098 

Generated on Sat May 26 2012 04:16:28 for ReactOS by doxygen 1.7.6.1

ReactOS is a registered trademark or a trademark of ReactOS Foundation in the United States and other countries.