Subversion Repositories HelenOS-historic

Compare Revisions

Ignore whitespace Rev 470 → Rev 471

/SPARTAN/trunk/generic/include/panic.h
29,7 → 29,7
#ifndef __PANIC_H__
#define __PANIC_H__
 
#ifndef NDEBUG
#ifdef CONFIG_DEBUG
# define panic(format, ...) panic_printf("Kernel panic in %s() at %s on line %d: " format, __FUNCTION__, __FILE__, __LINE__, ##__VA_ARGS__);
#else
# define panic(format, ...) panic_printf("Kernel panic: " format, ##__VA_ARGS__);
/SPARTAN/trunk/generic/include/debug.h
34,7 → 34,7
 
/** Debugging ASSERT macro
*
* If NDEBUG is not set, the ASSERT() macro
* If CONFIG_DEBUG is set, the ASSERT() macro
* evaluates expr and if it is false raises
* kernel panic.
*
41,7 → 41,7
* @param expr Expression which is expected to be true.
*
*/
#ifndef NDEBUG
#ifdef CONFIG_DEBUG
# define ASSERT(expr) if (!(expr)) { panic("assertion failed (%s)", #expr); }
#else
# define ASSERT(expr)