1/* 2 * Copyright (c) 2007-11 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, Universitaetstrasse 6, CH-8092 Zurich. Attn: Systems Group. 8 */ 9 10#ifndef QUEUE_MANAGER_DEBUG_H_ 11#define QUEUE_MANAGER_DEBUG_H_ 12 13 14/***************************************************************** 15 * Debug printer: 16 *****************************************************************/ 17 18void ethersrv_debug_printf(const char *fmt, ...); 19 20//#define ETHERSRV_SERVICE_DEBUG 1 21 22#if defined(ETHERSRV_SERVICE_DEBUG) || defined(GLOBAL_DEBUG) 23#define ETHERSRV_DEBUG(x...) do { printf("NQM:%s.%d:%s:%d: ", \ 24 disp_name(), disp_get_core_id(), __func__, __LINE__); \ 25 printf(x);\ 26 } while (0) 27 28#else 29#define ETHERSRV_DEBUG(x...) ((void)0) 30#endif // defined(ETHERSRV_SERVICE_DEBUG) || defined(GLOBAL_DEBUG) 31 32#endif // QUEUE_MANAGER_DEBUG_H_ 33 34