/************************************************************************/
/* DEBUG-tool								*/
/************************************************************************/

#ifdef __cplusplus
extern "C" {
#endif

#if DEBUG
#define	LOG_INIT	(1 <<  0)
#define	LOG_OPEN	(1 <<  1)
#define	LOG_CLOSE	(1 <<  2)
#define	LOG_INTR	(1 <<  3)
#define	LOG_READ	(1 <<  4)
#define	LOG_WRITE	(1 <<  5)
#define	LOG_IOCTL	(1 <<  6)
#define	LOG_DEF		(1 <<  7)

#define	LOG_CAN		(1 <<  8)
#define	LOG_MIN		(1 <<  9)
#define	LOG_AST		(1 << 10)
#define	LOG_FUNC	(1 << 11)
#define	LOG_EXIT	(1 << 12)
#define	LOG_INT		(1 << 13)
#define	LOG_MMAP	(1 << 14)
#define	LOG_LOCK	(1 << 15)
#define	LOG_RESET	(1 << 16)
#define	LOG_SEM		(1 << 17)
#define	LOG_RMAIL	(1 << 18)
#define	LOG_WRFAST	(1 << 19)
#define	LOG_RDFAST	(1 << 20)
#define	LOG_WATCH	(1 << 21)
#define	LOG_ROUTE	(1 << 22)
#define	LOG_COP		(1 << 23)
#define	LOG_TPU		(1 << 24)
#define	LOG_PP		(1 << 24)

#define	LOG_MAX		(1 << 31)

#if 0
static int      debug = LOG_RESET | LOG_INIT | LOG_OPEN | LOG_CLOSE | \
			LOG_IOCTL | LOG_INTR | LOG_WRITE | LOG_READ;
#endif
#if 0
static int      debug = LOG_PP | LOG_WATCH | LOG_ROUTE | LOG_RDFAST | LOG_INTR | LOG_TPU | LOG_COP;
#endif
#if 1
static int      debug = LOG_WRITE | LOG_INIT | LOG_IOCTL;
#endif

int printf_ ();

/* #define	LOG(level, message) if(debug & level) logMsg message */
#define	LOG(level, message) if(debug & level) printk message
#else
#define	LOG(level, message)
#endif

#ifdef __cplusplus
}
#endif
