ffs, ffsl, ffsll - find first bit set in a word


   #include <strings.h>

   int ffs(int i);

   #include <string.h>

   int ffsl(long int i);

   int ffsll(long long int i);

   Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

       Since glibc 2.12:
               _XOPEN_SOURCE >= 700
               || ! (_POSIX_C_SOURCE >= 200809L)
               || /* Glibc since 2.19: */ _DEFAULT_SOURCE
               || /* Glibc versions <= 2.19: */ _BSD_SOURCE ||
       Before glibc 2.12:
   ffsl(), ffsll():


   The  ffs()  function  returns  the  position  of   the   first   (least
   significant)  bit  set  in  the  word  i.  The least significant bit is
   position 1 and the most significant position is, for example, 32 or 64.
   The  functions  ffsll()  and  ffsl()  do the same but take arguments of
   possibly different size.


   These functions return the position of the first bit set, or  0  if  no
   bits are set in i.


   For   an   explanation   of   the  terms  used  in  this  section,  see

   │InterfaceAttributeValue   │
   │ffs(), ffsl(), ffsll() │ Thread safety │ MT-Safe │


   ffs(): POSIX.1-2001, POSIX.1-2008, 4.3BSD.

   The ffsl() and ffsll() functions are glibc extensions.


   BSD systems have a prototype in <string.h>.




   This page is part of release 4.09 of the Linux  man-pages  project.   A
   description  of  the project, information about reporting bugs, and the
   latest    version    of    this    page,    can     be     found     at

More Linux Commands

gnutls_transport_get_ptr2(3) - API function - Linux man page
Used to get the arguments of the transport functions (like PUSH and PULL). These should have been set using gnutls_transport_set_ptr2(). REPORTING BUGS Report b

instmodsh(1) - A shell to examine installed modules.........
A little interface to ExtUtils::Installed to examine installed modules, validate your packlists and even create a tarball from an installed module. SEE ALSO Ext

gvfs-mkdir(1) Create directories (Commands - Linux man page)
gvfs-mkdir creates directories. gvfs-mkdir is similar to the traditional mkdir utility, but using gvfs locations instead of local files: for example you can use

pnmmercator(1) - transform a worldmap from rectangular proje
This program is part of Netpbm(1) The pnmmercator utility, converts a rectangular projection worldmap to a Mercator projection format, as used for maps.no_googl

color_content_sp(3ncurses) - curses screen-pointer extension
This implementation can be configured to provide a set of functions which improve the ability to manage multiple screens. This feature can be added to any of th

Tcl_WriteRaw(3) - buffered I/O facilities using channels....
The Tcl channel mechanism provides a device-independent and platform-independent mechanism for performing buffered input and output operations on a variety of f

filter_sp(3ncurses) - curses screen-pointer extension.......
This implementation can be configured to provide a set of functions which improve the ability to manage multiple screens. This feature can be added to any of th

hpsa(4) - HP Smart Array SCSI driver - Linux manual page....
hpsa is a SCSI driver for HP Smart Array RAID controllers. Options hpsa_allow_any=1: This option allows the driver to attempt to operate on any HP Smart Array h

mknodat(2) - create a special or ordinary file relative to a
The system call mknod() creates a filesystem node (file, device special file, or named pipe) named pathname, with attributes specified by mode and dev. The mode

glIndexMask(3gl) - control the writing of individual bits in
glIndexMask controls the writing of individual bits in the color index buffers. The least significant $n$ bits of mask, where $n$ is the number of bits in a col

Tcl_GetChannelBufferSize(3) - procedures for creating and ma
Tcl uses a two-layered channel architecture. It provides a generic upper layer to enable C and Tcl programs to perform input and output using the same APIs for

gnutls_psk_free_server_credentials(3) - API function........
gnutls_psk_free_server_credentials.3 - This structure is complex enough to manipulate directly thus this helper function is provided in order to free (deallocat

We can't live, work or learn in freedom unless the software we use is free.