[ SYSTEM ]: Linux srv.persadacompanies.com 4.18.0-553.56.1.el8_10.x86_64 #1 SMP Tue Jun 10 05:00:59 EDT 2025 x86_64
[ SERVER ]: Apache | PHP: 8.4.20
[ USER ]: persadamedika | IP: 45.64.1.108
GEFORCE FILE MANAGER
/
usr
/
src
/
kernels
/
4.18.0-553.64.1.el8_10.x86_64
/
include
/
asm-generic
/
bitops
/
UPLOAD:
NAME
SIZE
QUICK PERMS
ACTIONS
📄 __ffs.h
777 B
SET
[ EDIT ]
|
[ DEL ]
📄 __fls.h
920 B
SET
[ EDIT ]
|
[ DEL ]
📄 arch_hweight.h
555 B
SET
[ EDIT ]
|
[ DEL ]
📄 atomic.h
1,511 B
SET
[ EDIT ]
|
[ DEL ]
📄 builtin-__ffs.h
379 B
SET
[ EDIT ]
|
[ DEL ]
📄 builtin-__fls.h
436 B
SET
[ EDIT ]
|
[ DEL ]
📄 builtin-ffs.h
410 B
SET
[ EDIT ]
|
[ DEL ]
📄 builtin-fls.h
403 B
SET
[ EDIT ]
|
[ DEL ]
📄 const_hweight.h
1,711 B
SET
[ EDIT ]
|
[ DEL ]
📄 ext2-atomic-setbit.h
403 B
SET
[ EDIT ]
|
[ DEL ]
📄 ext2-atomic.h
600 B
SET
[ EDIT ]
|
[ DEL ]
📄 ffs.h
654 B
SET
[ EDIT ]
|
[ DEL ]
📄 ffz.h
325 B
SET
[ EDIT ]
|
[ DEL ]
📄 find.h
3,244 B
SET
[ EDIT ]
|
[ DEL ]
📄 fls.h
674 B
SET
[ EDIT ]
|
[ DEL ]
📄 fls64.h
860 B
SET
[ EDIT ]
|
[ DEL ]
📄 hweight.h
254 B
SET
[ EDIT ]
|
[ DEL ]
📄 le.h
2,239 B
SET
[ EDIT ]
|
[ DEL ]
📄 lock.h
2,505 B
SET
[ EDIT ]
|
[ DEL ]
📄 non-atomic.h
3,535 B
SET
[ EDIT ]
|
[ DEL ]
📄 sched.h
760 B
SET
[ EDIT ]
|
[ DEL ]
DELETE SELECTED
[ CLOSE ]
EDIT: non-atomic.h
/* SPDX-License-Identifier: GPL-2.0 */ #ifndef _ASM_GENERIC_BITOPS_NON_ATOMIC_H_ #define _ASM_GENERIC_BITOPS_NON_ATOMIC_H_ #include <asm/types.h> #include <asm/barrier.h> /** * __set_bit - Set a bit in memory * @nr: the bit to set * @addr: the address to start counting from * * Unlike set_bit(), this function is non-atomic and may be reordered. * If it's called on the same region of memory simultaneously, the effect * may be that only one operation succeeds. */ static inline void __set_bit(int nr, volatile unsigned long *addr) { unsigned long mask = BIT_MASK(nr); unsigned long *p = ((unsigned long *)addr) + BIT_WORD(nr); *p |= mask; } static inline void __clear_bit(int nr, volatile unsigned long *addr) { unsigned long mask = BIT_MASK(nr); unsigned long *p = ((unsigned long *)addr) + BIT_WORD(nr); *p &= ~mask; } /** * __change_bit - Toggle a bit in memory * @nr: the bit to change * @addr: the address to start counting from * * Unlike change_bit(), this function is non-atomic and may be reordered. * If it's called on the same region of memory simultaneously, the effect * may be that only one operation succeeds. */ static inline void __change_bit(int nr, volatile unsigned long *addr) { unsigned long mask = BIT_MASK(nr); unsigned long *p = ((unsigned long *)addr) + BIT_WORD(nr); *p ^= mask; } /** * __test_and_set_bit - Set a bit and return its old value * @nr: Bit to set * @addr: Address to count from * * This operation is non-atomic and can be reordered. * If two examples of this operation race, one can appear to succeed * but actually fail. You must protect multiple accesses with a lock. */ static inline int __test_and_set_bit(int nr, volatile unsigned long *addr) { unsigned long mask = BIT_MASK(nr); unsigned long *p = ((unsigned long *)addr) + BIT_WORD(nr); unsigned long old = *p; *p = old | mask; return (old & mask) != 0; } /** * __test_and_clear_bit - Clear a bit and return its old value * @nr: Bit to clear * @addr: Address to count from * * This operation is non-atomic and can be reordered. * If two examples of this operation race, one can appear to succeed * but actually fail. You must protect multiple accesses with a lock. */ static inline int __test_and_clear_bit(int nr, volatile unsigned long *addr) { unsigned long mask = BIT_MASK(nr); unsigned long *p = ((unsigned long *)addr) + BIT_WORD(nr); unsigned long old = *p; *p = old & ~mask; return (old & mask) != 0; } /* WARNING: non atomic and it can be reordered! */ static inline int __test_and_change_bit(int nr, volatile unsigned long *addr) { unsigned long mask = BIT_MASK(nr); unsigned long *p = ((unsigned long *)addr) + BIT_WORD(nr); unsigned long old = *p; *p = old ^ mask; return (old & mask) != 0; } /** * test_bit - Determine whether a bit is set * @nr: bit number to test * @addr: Address to start counting from */ static inline int test_bit(int nr, const volatile unsigned long *addr) { return 1UL & (addr[BIT_WORD(nr)] >> (nr & (BITS_PER_LONG-1))); } /** * arch_test_bit_acquire - Determine, with acquire semantics, whether a bit is set * @nr: bit number to test * @addr: Address to start counting from */ static __always_inline bool arch_test_bit_acquire(unsigned long nr, const volatile unsigned long *addr) { unsigned long *p = ((unsigned long *)addr) + BIT_WORD(nr); return 1UL & (smp_load_acquire(p) >> (nr & (BITS_PER_LONG-1))); } #define test_bit_acquire arch_test_bit_acquire #endif /* _ASM_GENERIC_BITOPS_NON_ATOMIC_H_ */