dmake: do not set MAKEFLAGS=k
[unleashed/tickless.git] / include / sys / ib / mgt / ibmf / ibmf_trace.h
blob25a4a1d9144cfa98abbaaf220b2604f1484ba176
1 /*
2 * CDDL HEADER START
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.
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.
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]
20 * CDDL HEADER END
23 * Copyright 2003 Sun Microsystems, Inc. All rights reserved.
24 * Use is subject to license terms.
27 #ifndef _SYS_IB_MGT_IBMF_IBMF_TRACE_H
28 #define _SYS_IB_MGT_IBMF_IBMF_TRACE_H
30 #pragma ident "%Z%%M% %I% %E% SMI"
33 * This file contains the IBMF trace/debug macros.
36 #ifdef __cplusplus
37 extern "C" {
38 #endif
40 #include <sys/tnf_probe.h>
42 #define IBMF_TNF_ERROR "ibmf ibmf_error"
43 #define IBMF_TNF_TRACE "ibmf ibmf_trace"
46 * Trace levels for printing
48 #define DPRINT_L0 0 /* no messages */
49 #define DPRINT_L1 1 /* major errors */
50 #define DPRINT_L2 2 /* minor errors */
51 #define DPRINT_L3 3 /* general debug */
52 #define DPRINT_L4 4 /* general trace */
55 * Trace probe macros
57 #define IBMF_TNF_NODEBUG 0
58 #define IBMF_TNF_DEBUG 1
60 #define IBMF_TRACE_0(trlevel, arg04) \
61 if (ibmf_trace_level > 0) { \
62 ibmf_dprintf(trlevel, arg04); \
65 /* CSTYLED */
66 #define IBMF_TRACE_1(trlevel, arg04, arg13) \
67 if (ibmf_trace_level > 0) { \
68 ibmf_dprintf(trlevel, arg04, arg13); \
71 /* CSTYLED */
72 #define IBMF_TRACE_2(trlevel, arg04, arg13, arg23) \
73 if (ibmf_trace_level > 0) { \
74 ibmf_dprintf(trlevel, arg04, arg13, arg23); \
77 /* CSTYLED */
78 #define IBMF_TRACE_3(trlevel, arg04, arg13,arg23, arg33) \
79 if (ibmf_trace_level > 0) { \
80 ibmf_dprintf(trlevel, arg04, arg13, arg23, arg33); \
83 /* CSTYLED */
84 #define IBMF_TRACE_4(trlevel, arg04, arg13, arg23, arg33, arg43) \
85 if (ibmf_trace_level > 0) { \
86 ibmf_dprintf(trlevel, arg04, arg13, arg23, arg33, arg43);\
89 /* CSTYLED */
90 #define IBMF_TRACE_5(trlevel, arg04, arg13, arg23, arg33, arg43, arg53) \
91 if (ibmf_trace_level > 0) { \
92 ibmf_dprintf(trlevel, arg04, arg13, arg23, arg33, \
93 arg43, arg53); \
96 void
97 ibmf_dprintf(int l, const char *fmt, ...);
99 #ifdef __cplusplus
101 #endif
103 #endif /* _SYS_IB_MGT_IBMF_IBMF_TRACE_H */