1 /* 2 * CDDL HEADER START 3 * 4 * The contents of this file are subject to the terms of the 5 * Common Development and Distribution License, Version 1.0 only 6 * (the "License"). You may not use this file except in compliance 7 * with the License. 8 * 9 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 10 * or http://www.opensolaris.org/os/licensing. 11 * See the License for the specific language governing permissions 12 * and limitations under the License. 13 * 14 * When distributing Covered Code, include this CDDL HEADER in each 15 * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 16 * If applicable, add the following below this CDDL HEADER, with the 17 * fields enclosed by brackets "[]" replaced with your own identifying 18 * information: Portions Copyright [yyyy] [name of copyright owner] 19 * 20 * CDDL HEADER END 21 */ 22 /* 23 * Copyright (c) 1994, by Sun Microsytems, Inc. 24 */ 25 26 #ifndef _DBG_H 27 #define _DBG_H 28 29 #pragma ident "%Z%%M% %I% %E% SMI" 30 31 /* 32 * Header file for debugging output. This is compiled in only if the 33 * code is compiled with -DDEBUG. There are two kinds of debugging output. 34 * The first is DBG, which is used to print output directly. The second is 35 * debug probes which can be controlled at run time via prex. 36 */ 37 38 #ifdef __cplusplus 39 extern "C" { 40 #endif 41 42 #ifdef DEBUG 43 #include <stdio.h> 44 45 #define DBG(x) (x) 46 #else 47 #define DBG(x) 48 #endif /* DEBUG */ 49 50 #ifdef DEBUG 51 #include <tnf/probe.h> 52 53 #define DBG_TNF_PROBE_0(a, b, c) \ 54 TNF_PROBE_0(a, b, c) 55 #define DBG_TNF_PROBE_1(a, b, c, t1, n1, v1) \ 56 TNF_PROBE_1(a, b, c, t1, n1, v1) 57 #define DBG_TNF_PROBE_2(a, b, c, t1, n1, v1, t2, n2, v2) \ 58 TNF_PROBE_2(a, b, c, t1, n1, v1, t2, n2, v2) 59 #define DBG_TNF_PROBE_3(a, b, c, t1, n1, v1, t2, n2, v2, t3, n3, v3) \ 60 TNF_PROBE_3(a, b, c, t1, n1, v1, t2, n2, v2, t3, n3, v3) 61 /* CSTYLED */ 62 #define DBG_TNF_PROBE_4(a, b, c, t1, n1, v1, t2, n2, v2, t3, n3, v3, t4, n4, v4) \ 63 TNF_PROBE_4(a, b, c, t1, n1, v1, t2, n2, v2, t3, n3, v3, t4, n4, v4) 64 65 #else 66 67 #define DBG_TNF_PROBE_0(a, b, c) \ 68 ((void)0) 69 #define DBG_TNF_PROBE_1(a, b, c, t1, n1, v1) \ 70 ((void)0) 71 #define DBG_TNF_PROBE_2(a, b, c, t1, n1, v1, t2, n2, v2) \ 72 ((void)0) 73 #define DBG_TNF_PROBE_3(a, b, c, t1, n1, v1, t2, n2, v2, t3, n3, v3) \ 74 ((void)0) 75 /* CSTYLED */ 76 #define DBG_TNF_PROBE_4(a, b, c, t1, n1, v1, t2, n2, v2, t3, n3, v3, t4, n4, v4) \ 77 ((void)0) 78 79 #endif /* DEBUG */ 80 81 #ifdef __cplusplus 82 } 83 #endif 84 85 #endif /* _DBG_H */ 86