iPXE
Defines | Functions | Variables
strings.h File Reference

String functions. More...

#include <string.h>
#include <bits/strings.h>

Go to the source code of this file.

Defines

#define ffsll(x)   ( __builtin_constant_p ( x ) ? __constant_ffsll ( x ) : __ffsll ( x ) )
 Find first (i.e.
#define ffsl(x)   ( __builtin_constant_p ( x ) ? __constant_ffsl ( x ) : __ffsl ( x ) )
 Find first (i.e.
#define ffs(x)   ffsl ( x )
 Find first (i.e.
#define flsll(x)   ( __builtin_constant_p ( x ) ? __constant_flsll ( x ) : __flsll ( x ) )
 Find last (i.e.
#define flsl(x)   ( __builtin_constant_p ( x ) ? __constant_flsl ( x ) : __flsl ( x ) )
 Find last (i.e.
#define fls(x)   flsl ( x )
 Find last (i.e.

Functions

 FILE_LICENCE (GPL2_OR_LATER_OR_UBDL)
static __attribute__ ((always_inline)) int __constant_ffsll(unsigned long long x)
 Find first (i.e.
int __ffsll (long long x)
int __ffsl (long x)
int __flsll (long long x)
int __flsl (long x)

Variables

static void * dest

Detailed Description

String functions.

Definition in file strings.h.


Define Documentation

#define ffsll (   x)    ( __builtin_constant_p ( x ) ? __constant_ffsll ( x ) : __ffsll ( x ) )

Find first (i.e.

least significant) set bit

Parameters:
xValue
Return values:
lsbLeast significant bit set in value (LSB=1), or zero

Definition at line 122 of file strings.h.

Referenced by ffsll_okx(), ffsll_var(), and usb_alloc_address().

#define ffsl (   x)    ( __builtin_constant_p ( x ) ? __constant_ffsl ( x ) : __ffsl ( x ) )

Find first (i.e.

least significant) set bit

Parameters:
xValue
Return values:
lsbLeast significant bit set in value (LSB=1), or zero

Definition at line 131 of file strings.h.

Referenced by ffsl_okx(), and ffsl_var().

#define ffs (   x)    ffsl ( x )

Find first (i.e.

least significant) set bit

Parameters:
xValue
Return values:
lsbLeast significant bit set in value (LSB=1), or zero

Definition at line 140 of file strings.h.

Referenced by efifb_colour_map_mask(), ehci_periodic_schedule(), exanic_expired(), and uhci_periodic_schedule().

#define flsll (   x)    ( __builtin_constant_p ( x ) ? __constant_flsll ( x ) : __flsll ( x ) )

Find last (i.e.

most significant) set bit

Parameters:
xValue
Return values:
msbMost significant bit set in value (LSB=1), or zero

Definition at line 148 of file strings.h.

Referenced by flsll_okx(), flsll_var(), and profile_update().

#define flsl (   x)    ( __builtin_constant_p ( x ) ? __constant_flsl ( x ) : __flsl ( x ) )

Find last (i.e.

most significant) set bit

Parameters:
xValue
Return values:
msbMost significant bit set in value (LSB=1), or zero

Definition at line 157 of file strings.h.

Referenced by flsl_okx(), flsl_var(), ipv6_match_len(), profile_update(), and slam_put_value().

#define fls (   x)    flsl ( x )

Function Documentation

FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL  )
static __attribute__ ( (always_inline)  ) [inline, static]

Find first (i.e.

Copy memory.

Find last (i.e.

least significant) set bit

Parameters:
xValue
Return values:
lsbLeast significant bit set in value (LSB=1), or zero

most significant) set bit

Parameters:
xValue
Return values:
msbMost significant bit set in value (LSB=1), or zero
Parameters:
srcSource
destDestination
lenLength

Definition at line 21 of file strings.h.

References r.

                                          {
        int r = 0;

        if ( ! ( x & 0x00000000ffffffffULL ) ) {
                x >>= 32;
                r += 32;
        }
        if ( ! ( x & 0x0000ffffUL ) ) {
                x >>= 16;
                r += 16;
        }
        if ( ! ( x & 0x00ff ) ) {
                x >>= 8;
                r += 8;
        }
        if ( ! ( x & 0x0f ) ) {
                x >>= 4;
                r += 4;
        }
        if ( ! ( x & 0x3 ) ) {
                x >>= 2;
                r += 2;
        }
        if ( ! ( x & 0x1 ) ) {
                x >>= 1;
                r += 1;
        }
        return ( x ? ( r + 1 ) : 0 );
}
int __ffsll ( long long  x)
int __ffsl ( long  x)
int __flsll ( long long  x)
int __flsl ( long  x)

Variable Documentation

void* dest