Print this page
9633 cxgbe should not reinvent the bool

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/io/cxgbe/t4nex/osdep.h
          +++ new/usr/src/uts/common/io/cxgbe/t4nex/osdep.h
↓ open down ↓ 22 lines elided ↑ open up ↑
  23   23  #ifndef __CXGBE_OSDEP_H
  24   24  #define __CXGBE_OSDEP_H
  25   25  
  26   26  #include <sys/ddi.h>
  27   27  #include <sys/sunddi.h>
  28   28  #include <sys/byteorder.h>
  29   29  #include <sys/cmn_err.h>
  30   30  #include <sys/pcie.h>
  31   31  #include <sys/sysmacros.h>
  32   32  #include <sys/inttypes.h>
       33 +#include <sys/stdbool.h>
  33   34  
  34   35  /* sys/user.h defines u, and that bothers us. */
  35   36  #undef u
  36   37  
  37   38  #define isdigit(x) ((x) >= '0' && (x) <= '9')
  38   39  #define isspace(x) ((x) == ' ' || (x) == '\t')
  39   40  #define toupper(x) (((x) >= 'a' && (x) <= 'z') ? (x) - 'a' + 'A' : (x))
  40   41  #define fls(x) ddi_fls(x)
  41   42  
  42   43  #define CH_ERR(sc, ...)         cxgb_printf(sc->dip, CE_WARN, ##__VA_ARGS__)
↓ open down ↓ 136 lines elided ↑ open up ↑
 179  180  typedef uint32_t        __be32;
 180  181  typedef uint64_t        __be64;
 181  182  
 182  183  typedef uint32_t        __le32;
 183  184  
 184  185  typedef int8_t          s8;
 185  186  typedef int16_t         s16;
 186  187  typedef int32_t         s32;
 187  188  typedef int64_t         s64;
 188  189  
 189      -typedef boolean_t       bool;
 190      -#define true            B_TRUE
 191      -#define false           B_FALSE
 192      -
 193  190  #if defined(__sparc)
 194  191  #define __BIG_ENDIAN_BITFIELD
 195  192  #define PAGE_SIZE 8192
 196  193  #define PAGE_SHIFT 13
 197  194  #define CACHE_LINE 64
 198  195  #else
 199  196  #define __LITTLE_ENDIAN_BITFIELD
 200  197  #define PAGE_SIZE 4096
 201  198  #define PAGE_SHIFT 12
 202  199  #define CACHE_LINE 32
↓ open down ↓ 49 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX