ffsl(3)


NAME

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

SYNOPSIS

   #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)):

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

DESCRIPTION

   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.

RETURN VALUE

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

ATTRIBUTES

   For   an   explanation   of   the  terms  used  in  this  section,  see
   attributes(7).

   ┌───────────────────────┬───────────────┬─────────┐
   │InterfaceAttributeValue   │
   ├───────────────────────┼───────────────┼─────────┤
   │ffs(), ffsl(), ffsll() │ Thread safety │ MT-Safe │
   └───────────────────────┴───────────────┴─────────┘

CONFORMING TO

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

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

NOTES

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

SEE ALSO

   memchr(3)

COLOPHON

   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
   https://www.kernel.org/doc/man-pages/.


More Linux Commands

manpages/gnutls_transport_get_ptr2.3.html
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

manpages/instmodsh.1.html
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

manpages/gvfs-mkdir.1.html
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

manpages/pnmmercator.1.html
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

manpages/color_content_sp.3ncurses.html
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

manpages/Tcl_WriteRaw.3.html
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

manpages/filter_sp.3ncurses.html
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

manpages/hpsa.4.html
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

manpages/mknodat.2.html
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

manpages/glIndexMask.3gl.html
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

manpages/Tcl_GetChannelBufferSize.3.html
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

manpages/gnutls_psk_free_server_credentials.3.html
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.