![]() |
|
|||
0001 /* SPDX-License-Identifier: GPL-2.0 */ 0002 #ifndef _ASM_GENERIC_BITOPS_BUILTIN___FLS_H_ 0003 #define _ASM_GENERIC_BITOPS_BUILTIN___FLS_H_ 0004 0005 /** 0006 * __fls - find last (most-significant) set bit in a long word 0007 * @word: the word to search 0008 * 0009 * Undefined if no set bit exists, so code should check against 0 first. 0010 */ 0011 static __always_inline unsigned long __fls(unsigned long word) 0012 { 0013 return (sizeof(word) * 8) - 1 - __builtin_clzl(word); 0014 } 0015 0016 #endif
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.1.0 LXR engine. The LXR team |
![]() ![]() |