Print this page
8627 want ddi_ffsll, ddi_flsll
Reviewed by: Jerry Jelinek <jerry.jelinek@joyent.com>
Reviewed by: Patrick Mooney <patrick.mooney@joyent.com>

Split Close
Expand all
Collapse all
          --- old/usr/src/man/man9f/ddi_ffs.9f.man.txt
          +++ new/usr/src/man/man9f/ddi_ffs.9f.man.txt
   1    1  DDI_FFS(9F)              Kernel Functions for Drivers              DDI_FFS(9F)
   2    2  
   3      -
   4      -
   5    3  NAME
   6      -       ddi_ffs, ddi_fls - find first (last) bit set in a long integer
        4 +     ddi_ffs, ddi_ffsll, ddi_fls, ddi_flsll - find first (last) bit set in a
        5 +     long (long) integer
   7    6  
   8    7  SYNOPSIS
   9      -       #include <sys/conf.h>
  10      -       #include <sys/ddi.h>
  11      -       #include <sys/sunddi.h>
        8 +     #include <sys/conf.h>
        9 +     #include <sys/ddi.h>
       10 +     #include <sys/sunddi.h>
  12   11  
       12 +     int
       13 +     ddi_ffs(long mask);
  13   14  
       15 +     int
       16 +     ddi_fls(long mask);
  14   17  
  15      -       int ddi_ffs(long mask);
       18 +     int
       19 +     ddi_ffs(long long mask);
  16   20  
       21 +     int
       22 +     ddi_fls(long long mask);
  17   23  
  18      -       int ddi_fls(long mask);
  19      -
  20      -
  21   24  INTERFACE LEVEL
  22      -       Solaris DDI specific (Solaris DDI).
       25 +     Solaris DDI specific (Solaris DDI).
  23   26  
  24   27  PARAMETERS
  25      -       mask
  26      -               A 32-bit argument value to search through.
       28 +     mask          A 32-bit or 64-bit argument value to search through.
  27   29  
  28      -
  29   30  DESCRIPTION
  30      -       The function ddi_ffs() takes its argument and returns the shift count
  31      -       that the first (least significant) bit set in the argument corresponds
  32      -       to. The function ddi_fls() does the same, only it returns the shift
  33      -       count for the last (most significant) bit set in the argument.
       31 +     The functions ddi_ffs() and ddi_ffsll() take their argument and return
       32 +     the shift count that the first (least significant) bit set in the
       33 +     argument corresponds to.  The functions ddi_fls() and ddi_flsll() do the
       34 +     same, only they returns the shift count for the last (most significant)
       35 +     bit set in the argument.  ddi_ffs() and ddi_fls() operate on 32-bit
       36 +     values, while ddi_ffsll() and ddi_flsll() operate on 64-bit values.
  34   37  
       38 +CONTEXT
       39 +     These functions can be called from user, interrupt, or kernel context.
       40 +
  35   41  RETURN VALUES
  36      -       0
  37      -            No bits are set in mask.
       42 +     0             No bits are set in mask.
  38   43  
       44 +     N             Bit N is the least significant (ddi_ffs(), ddi_ffsll()) or
       45 +                   most significant (ddi_fls(), ddi_flsll()) bit set in mask.
       46 +                   Bits are numbered from 1 to 32 or 64, with bit 1 being the
       47 +                   least significant bit position and bit 32 or 64 the most
       48 +                   significant position, depending on the variant of the
       49 +                   functions used.
  39   50  
  40      -       N
  41      -            Bit  N is the least significant (ddi_ffs) or most significant
  42      -            (ddi_fls) bit set in mask. Bits are numbered from  1 to  32, with
  43      -            bit 1 being the least significant bit position and bit 32 the most
  44      -            significant position.
  45      -
  46      -
  47      -CONTEXT
  48      -       This function can be called from user, interrupt, or kernel context.
  49      -
  50   51  SEE ALSO
  51      -       Writing Device Drivers
       52 +     Writing Device Drivers
  52   53  
  53      -
  54      -
  55      -                                 June 5, 2013                      DDI_FFS(9F)
       54 +illumos                          July 14, 2017                         illumos
    
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX