Print this page
10686 Debug macros causes smatch issues


   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 2004 Sun Microsystems, Inc.  All rights reserved.
  24  * Use is subject to license terms.
  25  */
  26 




  27 #ifndef _SYS_IB_IBTL_IMPL_IBTL_UTIL_H
  28 #define _SYS_IB_IBTL_IMPL_IBTL_UTIL_H
  29 
  30 #pragma ident   "%Z%%M% %I%     %E% SMI"
  31 
  32 /*
  33  * ibtl_util.h
  34  *
  35  * All data structures and function prototypes that serve as helper
  36  * routines for IBTF implementation.
  37  */
  38 
  39 #ifdef __cplusplus
  40 extern "C" {
  41 #endif
  42 
  43 #include <sys/ib/ib_types.h>
  44 #include <sys/varargs.h>
  45 
  46 /*
  47  * Time Related Functions
  48  *
  49  *   ibt_usec2ib
  50  *      This function converts the standard input time in microseconds to
  51  *      IB's 6 bits of timeout exponent, calculated based on


 114 
 115 #ifdef DEBUG
 116 #define IBTF_DPRINTF_LINTR      ibtl_dprintf_intr
 117 #define IBTF_DPRINTF_L5         ibtl_dprintf5
 118 #define IBTF_DPRINTF_L4         ibtl_dprintf4
 119 #define IBTF_DPRINTF_L3         ibtl_dprintf3
 120 
 121 void ibtl_dprintf_intr(
 122                 char            *name,
 123                 char            *fmt, ...);
 124 void ibtl_dprintf5(
 125                 char            *name,
 126                 char            *fmt, ...);
 127 void ibtl_dprintf4(
 128                 char            *name,
 129                 char            *fmt, ...);
 130 void ibtl_dprintf3(
 131                 char            *name,
 132                 char            *fmt, ...);
 133 #else
 134 #define IBTF_DPRINTF_LINTR      0 &&
 135 #define IBTF_DPRINTF_L5         0 &&
 136 #define IBTF_DPRINTF_L4         0 &&
 137 #define IBTF_DPRINTF_L3         0 &&
 138 #endif
 139 
 140 #define IBTF_DPRINTF_L2 ibtl_dprintf2
 141 #define IBTF_DPRINTF_L1 ibtl_dprintf1
 142 #define IBTF_DPRINTF_L0 ibtl_dprintf0
 143 
 144 void ibtl_dprintf2(
 145                 char            *name,
 146                 char            *fmt, ...);
 147 void ibtl_dprintf1(
 148                 char            *name,
 149                 char            *fmt, ...);
 150 void ibtl_dprintf0(
 151                 char            *name,
 152                 char            *fmt, ...);
 153 
 154 #ifdef __cplusplus
 155 }
 156 #endif
 157 


   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 2004 Sun Microsystems, Inc.  All rights reserved.
  24  * Use is subject to license terms.
  25  */
  26 
  27 /*
  28  * Copyright 2019, Joyent, Inc.
  29  */
  30 
  31 #ifndef _SYS_IB_IBTL_IMPL_IBTL_UTIL_H
  32 #define _SYS_IB_IBTL_IMPL_IBTL_UTIL_H
  33 


  34 /*
  35  * ibtl_util.h
  36  *
  37  * All data structures and function prototypes that serve as helper
  38  * routines for IBTF implementation.
  39  */
  40 
  41 #ifdef __cplusplus
  42 extern "C" {
  43 #endif
  44 
  45 #include <sys/ib/ib_types.h>
  46 #include <sys/varargs.h>
  47 
  48 /*
  49  * Time Related Functions
  50  *
  51  *   ibt_usec2ib
  52  *      This function converts the standard input time in microseconds to
  53  *      IB's 6 bits of timeout exponent, calculated based on


 116 
 117 #ifdef DEBUG
 118 #define IBTF_DPRINTF_LINTR      ibtl_dprintf_intr
 119 #define IBTF_DPRINTF_L5         ibtl_dprintf5
 120 #define IBTF_DPRINTF_L4         ibtl_dprintf4
 121 #define IBTF_DPRINTF_L3         ibtl_dprintf3
 122 
 123 void ibtl_dprintf_intr(
 124                 char            *name,
 125                 char            *fmt, ...);
 126 void ibtl_dprintf5(
 127                 char            *name,
 128                 char            *fmt, ...);
 129 void ibtl_dprintf4(
 130                 char            *name,
 131                 char            *fmt, ...);
 132 void ibtl_dprintf3(
 133                 char            *name,
 134                 char            *fmt, ...);
 135 #else
 136 #define IBTF_DPRINTF_LINTR(...)
 137 #define IBTF_DPRINTF_L5(...)
 138 #define IBTF_DPRINTF_L4(...)
 139 #define IBTF_DPRINTF_L3(...)
 140 #endif
 141 
 142 #define IBTF_DPRINTF_L2 ibtl_dprintf2
 143 #define IBTF_DPRINTF_L1 ibtl_dprintf1
 144 #define IBTF_DPRINTF_L0 ibtl_dprintf0
 145 
 146 void ibtl_dprintf2(
 147                 char            *name,
 148                 char            *fmt, ...);
 149 void ibtl_dprintf1(
 150                 char            *name,
 151                 char            *fmt, ...);
 152 void ibtl_dprintf0(
 153                 char            *name,
 154                 char            *fmt, ...);
 155 
 156 #ifdef __cplusplus
 157 }
 158 #endif
 159