1/* 2 * Copyright (c) 2014 ETH Zurich. 3 * All rights reserved. 4 * 5 * This file is distributed under the terms in the attached LICENSE file. 6 * If you do not find this file, copies can be found by writing to: 7 * ETH Zurich D-INFK, Universitaetsstrasse 64, CH-8092 Zurich. Attn: Systems Group. 8 */ 9 10#ifndef __LIBBOMP_DEBUG_H 11#define __LIBBOMP_DEBUG_H 12 13#define BOMP_DEBUG_ENABLE 1 14#define BOMP_DEBUG_INIT_ENABLE 1 15#define BOMP_DEBUG_EXEC_ENABLE 1 16#define BOMP_DEBUG_CTRL_ENABLE 1 17#define BOMP_DEBUG_THREAD_ENABLE 1 18#define BOMP_DEBUG_NODE_ENABLE 1 19 20#define BOMP_ERROR(x, ...) debug_printf("[libbomp] ERROR: " x, __VA_ARGS__) 21#define BOMP_WARNING(x, ...) 22#define BOMP_NOTICE(x, ...) debug_printf("[libbomp] NOTICE: " x, __VA_ARGS__) 23 24#if BOMP_DEBUG_ENABLE 25#define BOMP_DEBUG_PRINT(x...) debug_printf("[libbomp] " x); 26#else 27#define BOMP_DEBUG_PRINT(x...) 28#endif 29 30#if BOMP_DEBUG_INIT_ENABLE 31#define BOMP_DEBUG_INIT(x...) BOMP_DEBUG_PRINT("[init ] " x) 32#else 33#define BOMP_DEBUG_INIT(x...) 34#endif 35 36#if BOMP_DEBUG_EXEC_ENABLE 37#define BOMP_DEBUG_EXEC(x...) BOMP_DEBUG_PRINT("[exec ] " x) 38#else 39#define BOMP_DEBUG_EXEC(x...) 40#endif 41 42#if BOMP_DEBUG_CTRL_ENABLE 43#define BOMP_DEBUG_CTRL(x...) BOMP_DEBUG_PRINT("[ctrl ] " x) 44#else 45#define BOMP_DEBUG_CTRL(x...) 46#endif 47 48#if BOMP_DEBUG_THREAD_ENABLE 49#define BOMP_DEBUG_THREAD(x...) BOMP_DEBUG_PRINT("[thread] " x) 50#else 51#define BOMP_DEBUG_THREAD(x...) 52#endif 53 54#if BOMP_DEBUG_NODE_ENABLE 55#define BOMP_DEBUG_NODE(x...) BOMP_DEBUG_PRINT("[node ] " x) 56#else 57#define BOMP_DEBUG_NODE(x...) 58#endif 59 60 61#endif /* __LIBBOMP_DEBUG_H */ 62