1/*
2 * Copyright (c) 2007-12 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 ELB1_DEBUG_H_
11#define ELB1_DEBUG_H_
12
13// defined in usr/bench/net_latency/elb/benchmark.c
14//extern char *app_type;
15extern bool is_server;
16
17// *****************************************************************
18// * Debug printer:
19// *****************************************************************
20//#define ELB1_SERVICE_DEBUG 1
21#if defined(ELB1_SERVICE_DEBUG) || defined(GLOBAL_DEBUG)
22#define ELB1_DEBUG(x...) do{                                    \
23            if (is_server){                                     \
24                printf(" ELB1[Server]: " x);                    \
25            } else {                                            \
26                printf(" ELB1[Client]: " x);                    \
27            }                                                   \
28        }while(0);
29#else
30#define ELB1_DEBUG(x...) ((void)0)
31#endif
32
33#endif // ELB1_DEBUG_H_
34
35