OXIESEC PANEL
- Current Dir:
/
/
usr
/
src
/
linux-headers-4.15.0-197
/
arch
/
alpha
/
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
320 bytes
01/28/2018 09:20:33 PM
rw-r--r--
📄
a.out-core.h
2.41 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
a.out.h
574 bytes
01/28/2018 09:20:33 PM
rw-r--r--
📄
agp.h
457 bytes
01/28/2018 09:20:33 PM
rw-r--r--
📄
agp_backend.h
948 bytes
01/28/2018 09:20:33 PM
rw-r--r--
📄
asm-offsets.h
35 bytes
01/28/2018 09:20:33 PM
rw-r--r--
📄
asm-prototypes.h
405 bytes
01/28/2018 09:20:33 PM
rw-r--r--
📄
atomic.h
9.15 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
barrier.h
2.17 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
bitops.h
8.83 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
bug.h
571 bytes
01/28/2018 09:20:33 PM
rw-r--r--
📄
bugs.h
294 bytes
01/28/2018 09:20:33 PM
rw-r--r--
📄
cache.h
507 bytes
01/28/2018 09:20:33 PM
rw-r--r--
📄
cacheflush.h
2.68 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
checksum.h
1.93 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
cmpxchg.h
1.67 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
compiler.h
498 bytes
01/28/2018 09:20:33 PM
rw-r--r--
📄
console.h
1.06 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
core_apecs.h
16.91 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
core_cia.h
15.43 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
core_irongate.h
6.63 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
core_lca.h
11.36 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
core_marvel.h
9.15 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
core_mcpcia.h
11.45 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
core_polaris.h
2.92 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
core_t2.h
19.13 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
core_titan.h
11.2 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
core_tsunami.h
8.29 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
core_wildfire.h
8.45 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
delay.h
264 bytes
01/28/2018 09:20:33 PM
rw-r--r--
📄
device.h
129 bytes
01/28/2018 09:20:33 PM
rw-r--r--
📄
div64.h
31 bytes
01/28/2018 09:20:33 PM
rw-r--r--
📄
dma-mapping.h
276 bytes
01/28/2018 09:20:33 PM
rw-r--r--
📄
dma.h
12.37 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
elf.h
5.71 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
emergency-restart.h
149 bytes
01/28/2018 09:20:33 PM
rw-r--r--
📄
err_common.h
3.24 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
err_ev6.h
116 bytes
01/28/2018 09:20:33 PM
rw-r--r--
📄
err_ev7.h
4.37 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
extable.h
1.42 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
floppy.h
3.07 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
fpu.h
1.78 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
ftrace.h
12 bytes
01/28/2018 09:20:33 PM
rw-r--r--
📄
futex.h
1.97 KB
11/01/2022 04:52:05 PM
rw-r--r--
📄
gct.h
1.02 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
hardirq.h
223 bytes
01/28/2018 09:20:33 PM
rw-r--r--
📄
hw_irq.h
302 bytes
01/28/2018 09:20:33 PM
rw-r--r--
📄
hwrpb.h
6.9 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
io.h
15.03 KB
11/01/2022 04:52:05 PM
rw-r--r--
📄
io_trivial.h
3.07 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
irq.h
2.31 KB
11/01/2022 04:52:05 PM
rw-r--r--
📄
irq_regs.h
34 bytes
01/28/2018 09:20:33 PM
rw-r--r--
📄
irqflags.h
1.17 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
jensen.h
8.39 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
kdebug.h
32 bytes
01/28/2018 09:20:33 PM
rw-r--r--
📄
kmap_types.h
265 bytes
01/28/2018 09:20:33 PM
rw-r--r--
📄
linkage.h
256 bytes
01/28/2018 09:20:33 PM
rw-r--r--
📄
local.h
2.59 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
local64.h
33 bytes
01/28/2018 09:20:33 PM
rw-r--r--
📄
machvec.h
3.68 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
mc146818rtc.h
680 bytes
01/28/2018 09:20:33 PM
rw-r--r--
📄
mce.h
4.04 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
mmu.h
203 bytes
01/28/2018 09:20:33 PM
rw-r--r--
📄
mmu_context.h
7.09 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
mmzone.h
2.98 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
module.h
329 bytes
01/28/2018 09:20:33 PM
rw-r--r--
📄
page.h
2.46 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
pal.h
5.01 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
param.h
284 bytes
01/28/2018 09:20:33 PM
rw-r--r--
📄
parport.h
536 bytes
01/28/2018 09:20:33 PM
rw-r--r--
📄
pci.h
2.87 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
percpu.h
527 bytes
01/28/2018 09:20:33 PM
rw-r--r--
📄
perf_event.h
105 bytes
01/28/2018 09:20:33 PM
rw-r--r--
📄
pgalloc.h
1.82 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
pgtable.h
13.17 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
processor.h
2.07 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
ptrace.h
754 bytes
01/28/2018 09:20:33 PM
rw-r--r--
📄
rwsem.h
4.62 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
segment.h
132 bytes
01/28/2018 09:20:33 PM
rw-r--r--
📄
serial.h
1.01 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
sfp-machine.h
2.86 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
shmparam.h
191 bytes
01/28/2018 09:20:33 PM
rw-r--r--
📄
signal.h
627 bytes
01/28/2018 09:20:33 PM
rw-r--r--
📄
smp.h
1.34 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
socket.h
310 bytes
01/28/2018 09:20:33 PM
rw-r--r--
📄
special_insns.h
925 bytes
01/28/2018 09:20:33 PM
rw-r--r--
📄
spinlock.h
2.85 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
spinlock_types.h
413 bytes
01/28/2018 09:20:33 PM
rw-r--r--
📄
string.h
2.42 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
switch_to.h
406 bytes
01/28/2018 09:20:33 PM
rw-r--r--
📄
syscall.h
235 bytes
01/28/2018 09:20:33 PM
rw-r--r--
📄
termios.h
2.98 KB
11/01/2022 04:52:05 PM
rw-r--r--
📄
thread_info.h
3.63 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
timex.h
827 bytes
11/01/2022 04:52:05 PM
rw-r--r--
📄
tlb.h
473 bytes
01/28/2018 09:20:33 PM
rw-r--r--
📄
tlbflush.h
3.37 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
topology.h
957 bytes
01/28/2018 09:20:33 PM
rw-r--r--
📄
types.h
143 bytes
01/28/2018 09:20:33 PM
rw-r--r--
📄
uaccess.h
9.56 KB
11/01/2022 04:52:05 PM
rw-r--r--
📄
ucontext.h
348 bytes
01/28/2018 09:20:33 PM
rw-r--r--
📄
unaligned.h
340 bytes
01/28/2018 09:20:33 PM
rw-r--r--
📄
unistd.h
494 bytes
01/28/2018 09:20:33 PM
rw-r--r--
📄
user.h
2.14 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
vga.h
2 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
word-at-a-time.h
1.34 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
wrperfmon.h
2.56 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
xchg.h
5.74 KB
11/01/2022 04:52:05 PM
rw-r--r--
📄
xor.h
21.71 KB
01/28/2018 09:20:33 PM
rw-r--r--
Editing: rwsem.h
Close
/* SPDX-License-Identifier: GPL-2.0 */ #ifndef _ALPHA_RWSEM_H #define _ALPHA_RWSEM_H /* * Written by Ivan Kokshaysky <ink@jurassic.park.msu.ru>, 2001. * Based on asm-alpha/semaphore.h and asm-i386/rwsem.h */ #ifndef _LINUX_RWSEM_H #error "please don't include asm/rwsem.h directly, use linux/rwsem.h instead" #endif #ifdef __KERNEL__ #include <linux/compiler.h> #define RWSEM_UNLOCKED_VALUE 0x0000000000000000L #define RWSEM_ACTIVE_BIAS 0x0000000000000001L #define RWSEM_ACTIVE_MASK 0x00000000ffffffffL #define RWSEM_WAITING_BIAS (-0x0000000100000000L) #define RWSEM_ACTIVE_READ_BIAS RWSEM_ACTIVE_BIAS #define RWSEM_ACTIVE_WRITE_BIAS (RWSEM_WAITING_BIAS + RWSEM_ACTIVE_BIAS) static inline int ___down_read(struct rw_semaphore *sem) { long oldcount; #ifndef CONFIG_SMP oldcount = sem->count.counter; sem->count.counter += RWSEM_ACTIVE_READ_BIAS; #else long temp; __asm__ __volatile__( "1: ldq_l %0,%1\n" " addq %0,%3,%2\n" " stq_c %2,%1\n" " beq %2,2f\n" " mb\n" ".subsection 2\n" "2: br 1b\n" ".previous" :"=&r" (oldcount), "=m" (sem->count), "=&r" (temp) :"Ir" (RWSEM_ACTIVE_READ_BIAS), "m" (sem->count) : "memory"); #endif return (oldcount < 0); } static inline void __down_read(struct rw_semaphore *sem) { if (unlikely(___down_read(sem))) rwsem_down_read_failed(sem); } static inline int __down_read_killable(struct rw_semaphore *sem) { if (unlikely(___down_read(sem))) if (IS_ERR(rwsem_down_read_failed_killable(sem))) return -EINTR; return 0; } /* * trylock for reading -- returns 1 if successful, 0 if contention */ static inline int __down_read_trylock(struct rw_semaphore *sem) { long old, new, res; res = atomic_long_read(&sem->count); do { new = res + RWSEM_ACTIVE_READ_BIAS; if (new <= 0) break; old = res; res = atomic_long_cmpxchg(&sem->count, old, new); } while (res != old); return res >= 0 ? 1 : 0; } static inline long ___down_write(struct rw_semaphore *sem) { long oldcount; #ifndef CONFIG_SMP oldcount = sem->count.counter; sem->count.counter += RWSEM_ACTIVE_WRITE_BIAS; #else long temp; __asm__ __volatile__( "1: ldq_l %0,%1\n" " addq %0,%3,%2\n" " stq_c %2,%1\n" " beq %2,2f\n" " mb\n" ".subsection 2\n" "2: br 1b\n" ".previous" :"=&r" (oldcount), "=m" (sem->count), "=&r" (temp) :"Ir" (RWSEM_ACTIVE_WRITE_BIAS), "m" (sem->count) : "memory"); #endif return oldcount; } static inline void __down_write(struct rw_semaphore *sem) { if (unlikely(___down_write(sem))) rwsem_down_write_failed(sem); } static inline int __down_write_killable(struct rw_semaphore *sem) { if (unlikely(___down_write(sem))) { if (IS_ERR(rwsem_down_write_failed_killable(sem))) return -EINTR; } return 0; } /* * trylock for writing -- returns 1 if successful, 0 if contention */ static inline int __down_write_trylock(struct rw_semaphore *sem) { long ret = atomic_long_cmpxchg(&sem->count, RWSEM_UNLOCKED_VALUE, RWSEM_ACTIVE_WRITE_BIAS); if (ret == RWSEM_UNLOCKED_VALUE) return 1; return 0; } static inline void __up_read(struct rw_semaphore *sem) { long oldcount; #ifndef CONFIG_SMP oldcount = sem->count.counter; sem->count.counter -= RWSEM_ACTIVE_READ_BIAS; #else long temp; __asm__ __volatile__( " mb\n" "1: ldq_l %0,%1\n" " subq %0,%3,%2\n" " stq_c %2,%1\n" " beq %2,2f\n" ".subsection 2\n" "2: br 1b\n" ".previous" :"=&r" (oldcount), "=m" (sem->count), "=&r" (temp) :"Ir" (RWSEM_ACTIVE_READ_BIAS), "m" (sem->count) : "memory"); #endif if (unlikely(oldcount < 0)) if ((int)oldcount - RWSEM_ACTIVE_READ_BIAS == 0) rwsem_wake(sem); } static inline void __up_write(struct rw_semaphore *sem) { long count; #ifndef CONFIG_SMP sem->count.counter -= RWSEM_ACTIVE_WRITE_BIAS; count = sem->count.counter; #else long temp; __asm__ __volatile__( " mb\n" "1: ldq_l %0,%1\n" " subq %0,%3,%2\n" " stq_c %2,%1\n" " beq %2,2f\n" " subq %0,%3,%0\n" ".subsection 2\n" "2: br 1b\n" ".previous" :"=&r" (count), "=m" (sem->count), "=&r" (temp) :"Ir" (RWSEM_ACTIVE_WRITE_BIAS), "m" (sem->count) : "memory"); #endif if (unlikely(count)) if ((int)count == 0) rwsem_wake(sem); } /* * downgrade write lock to read lock */ static inline void __downgrade_write(struct rw_semaphore *sem) { long oldcount; #ifndef CONFIG_SMP oldcount = sem->count.counter; sem->count.counter -= RWSEM_WAITING_BIAS; #else long temp; __asm__ __volatile__( "1: ldq_l %0,%1\n" " addq %0,%3,%2\n" " stq_c %2,%1\n" " beq %2,2f\n" " mb\n" ".subsection 2\n" "2: br 1b\n" ".previous" :"=&r" (oldcount), "=m" (sem->count), "=&r" (temp) :"Ir" (-RWSEM_WAITING_BIAS), "m" (sem->count) : "memory"); #endif if (unlikely(oldcount < 0)) rwsem_downgrade_wake(sem); } #endif /* __KERNEL__ */ #endif /* _ALPHA_RWSEM_H */