include/asm-generic/bitops/builtin-__ffs.h

Source file repositories/reference/linux-study-clean/include/asm-generic/bitops/builtin-__ffs.h

File Facts

System
Linux kernel
Corpus path
include/asm-generic/bitops/builtin-__ffs.h
Extension
.h
Size
398 bytes
Lines
17
Domain
Repository Root And Misc
Bucket
include
Inferred role
Repository Root And Misc: implementation source
Status
source implementation candidate

Why This File Exists

Top-level or miscellaneous repository surface. Use this as map coverage unless a later manual pass promotes the file into a deeper subsystem dossier.

Dependency Surface

Detected Declarations

Annotated Snippet

#ifndef _ASM_GENERIC_BITOPS_BUILTIN___FFS_H_
#define _ASM_GENERIC_BITOPS_BUILTIN___FFS_H_

/**
 * __ffs - find first bit in word.
 * @word: The word to search
 *
 * Undefined if no bit exists, so code should check against 0 first.
 */
static __always_inline __attribute_const__ unsigned int __ffs(unsigned long word)
{
	return __builtin_ctzl(word);
}

#endif

Annotation

Implementation Notes