Print this page
8956 Implement KPTI
Reviewed by: Jerry Jelinek <jerry.jelinek@joyent.com>
Reviewed by: Robert Mustacchi <rm@joyent.com>

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/sys/sysmacros.h
          +++ new/usr/src/uts/common/sys/sysmacros.h
↓ open down ↓ 19 lines elided ↑ open up ↑
  20   20   */
  21   21  /*      Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
  22   22  /*        All Rights Reserved   */
  23   23  
  24   24  
  25   25  /*
  26   26   * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
  27   27   * Use is subject to license terms.
  28   28   *
  29   29   * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
       30 + *
       31 + * Copyright 2018 Joyent Inc.
  30   32   */
  31   33  
  32   34  #ifndef _SYS_SYSMACROS_H
  33   35  #define _SYS_SYSMACROS_H
  34   36  
  35   37  #include <sys/param.h>
  36   38  #include <sys/stddef.h>
  37   39  
  38   40  #ifdef  __cplusplus
  39   41  extern "C" {
↓ open down ↓ 320 lines elided ↑ open up ↑
 360  362  #define DECL_BITFIELD6(_a, _b, _c, _d, _e, _f)          \
 361  363          uint8_t _f, _e, _d, _c, _b, _a
 362  364  #define DECL_BITFIELD7(_a, _b, _c, _d, _e, _f, _g)      \
 363  365          uint8_t _g, _f, _e, _d, _c, _b, _a
 364  366  #define DECL_BITFIELD8(_a, _b, _c, _d, _e, _f, _g, _h)  \
 365  367          uint8_t _h, _g, _f, _e, _d, _c, _b, _a
 366  368  #else
 367  369  #error  One of _BIT_FIELDS_LTOH or _BIT_FIELDS_HTOL must be defined
 368  370  #endif  /* _BIT_FIELDS_LTOH */
 369  371  
 370      -/* avoid any possibility of clashing with <stddef.h> version */
 371      -#if (defined(_KERNEL) || defined(_FAKE_KERNEL)) && !defined(_KMEMUSER)
 372      -
      372 +#if !defined(ARRAY_SIZE)
 373  373  #define ARRAY_SIZE(x)   (sizeof (x) / sizeof (x[0]))
      374 +#endif
 374  375  
 375      -#endif /* _KERNEL, !_KMEMUSER */
 376      -
 377  376  #ifdef  __cplusplus
 378  377  }
 379  378  #endif
 380  379  
 381  380  #endif  /* _SYS_SYSMACROS_H */
    
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX