Print this page
8115 parallel zfs mount

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/sys/bitmap.h
          +++ new/usr/src/uts/common/sys/bitmap.h
↓ open down ↓ 18 lines elided ↑ open up ↑
  19   19   * CDDL HEADER END
  20   20   */
  21   21  
  22   22  /*
  23   23   * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
  24   24   * Use is subject to license terms.
  25   25   */
  26   26  
  27   27  /*
  28   28   * Copyright (c) 2014 by Delphix. All rights reserved.
       29 + * Copyright 2017 RackTop Systems.
  29   30   */
  30   31  
  31   32  /*      Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
  32   33  /*        All Rights Reserved   */
  33   34  
  34   35  
  35   36  #ifndef _SYS_BITMAP_H
  36   37  #define _SYS_BITMAP_H
  37   38  
  38   39  #ifdef  __cplusplus
↓ open down ↓ 88 lines elided ↑ open up ↑
 127  128  
 128  129  
 129  130  /*
 130  131   * BIT_ONLYONESET is a private macro not designed for bitmaps of
 131  132   * arbitrary size.  u must be an unsigned integer/long.  It returns
 132  133   * true if one and only one bit is set in u.
 133  134   */
 134  135  #define BIT_ONLYONESET(u) \
 135  136          ((((u) == 0) ? 0 : ((u) & ((u) - 1)) == 0))
 136  137  
 137      -#if defined(_KERNEL) && !defined(_ASM)
      138 +#if (defined(_KERNEL) || defined(_FAKE_KERNEL)) && !defined(_ASM)
 138  139  #include <sys/atomic.h>
 139  140  
 140  141  /*
 141  142   * return next available bit index from map with specified number of bits
 142  143   */
 143  144  extern index_t  bt_availbit(ulong_t *bitmap, size_t nbits);
 144  145  /*
 145  146   * find the highest order bit that is on, and is within or below
 146  147   * the word specified by wx
 147  148   */
↓ open down ↓ 33 lines elided ↑ open up ↑
 181  182  #define BT_ATOMIC_CLEAR_EXCL(bitmap, bitindex, result) \
 182  183          { result = atomic_clear_long_excl(&(BT_WIM(bitmap, bitindex)),  \
 183  184              (bitindex) % BT_NBIPUL); }
 184  185  
 185  186  /*
 186  187   * Extracts bits between index h (high, inclusive) and l (low, exclusive) from
 187  188   * u, which must be an unsigned integer.
 188  189   */
 189  190  #define BITX(u, h, l)   (((u) >> (l)) & ((1LU << ((h) - (l) + 1LU)) - 1LU))
 190  191  
 191      -#endif  /* _KERNEL && !_ASM */
      192 +#endif  /* (_KERNEL || _FAKE_KERNEL) && !_ASM */
 192  193  
 193  194  #ifdef  __cplusplus
 194  195  }
 195  196  #endif
 196  197  
 197  198  #endif  /* _SYS_BITMAP_H */
    
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX