OXIESEC PANEL
- Current Dir:
/
/
usr
/
src
/
linux-headers-4.15.0-197
/
arch
/
h8300
/
include
/
asm
Server IP: 139.59.38.164
Upload:
Create Dir:
Name
Size
Modified
Perms
📁
..
-
11/17/2022 06:42:15 AM
rwxr-xr-x
📄
Kbuild
1.13 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
atomic.h
2.47 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
bitops.h
4.45 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
bug.h
263 bytes
01/28/2018 09:20:33 PM
rw-r--r--
📄
byteorder.h
148 bytes
11/01/2022 04:52:05 PM
rw-r--r--
📄
cache.h
281 bytes
01/28/2018 09:20:33 PM
rw-r--r--
📄
cmpxchg.h
1.49 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
dma-mapping.h
269 bytes
01/28/2018 09:20:33 PM
rw-r--r--
📄
elf.h
2.66 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
flat.h
1.1 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
hash.h
1.63 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
io.h
1.44 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
irq.h
555 bytes
01/28/2018 09:20:33 PM
rw-r--r--
📄
irqflags.h
1.88 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
kgdb.h
1.04 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
page.h
485 bytes
01/28/2018 09:20:33 PM
rw-r--r--
📄
page_offset.h
37 bytes
01/28/2018 09:20:33 PM
rw-r--r--
📄
pci.h
421 bytes
01/28/2018 09:20:33 PM
rw-r--r--
📄
pgtable.h
1.7 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
processor.h
3.17 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
ptrace.h
1.03 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
segment.h
886 bytes
01/28/2018 09:20:33 PM
rw-r--r--
📄
signal.h
520 bytes
01/28/2018 09:20:33 PM
rw-r--r--
📄
smp.h
32 bytes
01/28/2018 09:20:33 PM
rw-r--r--
📄
string.h
389 bytes
01/28/2018 09:20:33 PM
rw-r--r--
📄
switch_to.h
1.72 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
syscall.h
1.03 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
thread_info.h
3.26 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
tlb.h
166 bytes
01/28/2018 09:20:33 PM
rw-r--r--
📄
traps.h
1.06 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
uaccess.h
1.02 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
user.h
3.34 KB
01/28/2018 09:20:33 PM
rw-r--r--
Editing: atomic.h
Close
/* SPDX-License-Identifier: GPL-2.0 */ #ifndef __ARCH_H8300_ATOMIC__ #define __ARCH_H8300_ATOMIC__ #include <linux/types.h> #include <asm/cmpxchg.h> /* * Atomic operations that C can't guarantee us. Useful for * resource counting etc.. */ #define ATOMIC_INIT(i) { (i) } #define atomic_read(v) READ_ONCE((v)->counter) #define atomic_set(v, i) WRITE_ONCE(((v)->counter), (i)) #include <linux/kernel.h> #define ATOMIC_OP_RETURN(op, c_op) \ static inline int atomic_##op##_return(int i, atomic_t *v) \ { \ h8300flags flags; \ int ret; \ \ flags = arch_local_irq_save(); \ ret = v->counter c_op i; \ arch_local_irq_restore(flags); \ return ret; \ } #define ATOMIC_FETCH_OP(op, c_op) \ static inline int atomic_fetch_##op(int i, atomic_t *v) \ { \ h8300flags flags; \ int ret; \ \ flags = arch_local_irq_save(); \ ret = v->counter; \ v->counter c_op i; \ arch_local_irq_restore(flags); \ return ret; \ } #define ATOMIC_OP(op, c_op) \ static inline void atomic_##op(int i, atomic_t *v) \ { \ h8300flags flags; \ \ flags = arch_local_irq_save(); \ v->counter c_op i; \ arch_local_irq_restore(flags); \ } ATOMIC_OP_RETURN(add, +=) ATOMIC_OP_RETURN(sub, -=) #define ATOMIC_OPS(op, c_op) \ ATOMIC_OP(op, c_op) \ ATOMIC_FETCH_OP(op, c_op) ATOMIC_OPS(and, &=) ATOMIC_OPS(or, |=) ATOMIC_OPS(xor, ^=) ATOMIC_OPS(add, +=) ATOMIC_OPS(sub, -=) #undef ATOMIC_OPS #undef ATOMIC_OP_RETURN #undef ATOMIC_OP #define atomic_add_negative(a, v) (atomic_add_return((a), (v)) < 0) #define atomic_sub_and_test(i, v) (atomic_sub_return(i, v) == 0) #define atomic_inc_return(v) atomic_add_return(1, v) #define atomic_dec_return(v) atomic_sub_return(1, v) #define atomic_inc(v) (void)atomic_inc_return(v) #define atomic_inc_and_test(v) (atomic_inc_return(v) == 0) #define atomic_dec(v) (void)atomic_dec_return(v) #define atomic_dec_and_test(v) (atomic_dec_return(v) == 0) static inline int atomic_cmpxchg(atomic_t *v, int old, int new) { int ret; h8300flags flags; flags = arch_local_irq_save(); ret = v->counter; if (likely(ret == old)) v->counter = new; arch_local_irq_restore(flags); return ret; } static inline int __atomic_add_unless(atomic_t *v, int a, int u) { int ret; h8300flags flags; flags = arch_local_irq_save(); ret = v->counter; if (ret != u) v->counter += a; arch_local_irq_restore(flags); return ret; } #endif /* __ARCH_H8300_ATOMIC __ */