cregit-Linux how code gets into the kernel

Release 4.10 arch/x86/include/asm/spinlock.h

#ifndef _ASM_X86_SPINLOCK_H

#define _ASM_X86_SPINLOCK_H

#include <linux/jump_label.h>
#include <linux/atomic.h>
#include <asm/page.h>
#include <asm/processor.h>
#include <linux/compiler.h>
#include <asm/paravirt.h>
#include <asm/bitops.h>

/*
 * Your basic SMP spinlocks, allowing only a single CPU anywhere
 *
 * Simple spin lock operations.  There are two variants, one clears IRQ's
 * on the local processor, one does not.
 *
 * These are fair FIFO ticket locks, which support up to 2^16 CPUs.
 *
 * (the type definitions are in asm/spinlock_types.h)
 */

/* How long a lock should spin before we consider blocking */

#define SPIN_THRESHOLD	(1 << 15)

extern struct static_key paravirt_ticketlocks_enabled;
static __always_inline bool static_key_false(struct static_key *key);

#include <asm/qspinlock.h>

/*
 * Read-write spinlocks, allowing multiple readers
 * but only one writer.
 *
 * NOTE! it is quite common to have readers in interrupts
 * but no interrupt writers. For those circumstances we
 * can "mix" irq-safe locks - any writer needs to get a
 * irq-safe write-lock, but readers can get non-irqsafe
 * read-locks.
 *
 * On x86, we implement read-write locks using the generic qrwlock with
 * x86 specific optimization.
 */

#include <asm/qrwlock.h>


#define arch_read_lock_flags(lock, flags) arch_read_lock(lock)

#define arch_write_lock_flags(lock, flags) arch_write_lock(lock)


#define arch_spin_relax(lock)	cpu_relax()

#define arch_read_relax(lock)	cpu_relax()

#define arch_write_relax(lock)	cpu_relax()

#endif /* _ASM_X86_SPINLOCK_H */

Overall Contributors

PersonTokensPropCommitsCommitProp
thomas gleixnerthomas gleixner3333.67%320.00%
jeremy fitzhardingejeremy fitzhardinge3030.61%320.00%
robin holtrobin holt1414.29%16.67%
waiman longwaiman long77.14%320.00%
glauber de oliveira costaglauber de oliveira costa66.12%16.67%
h. peter anvinh. peter anvin33.06%16.67%
nick pigginnick piggin33.06%16.67%
arun sharmaarun sharma11.02%16.67%
richard weinbergerrichard weinberger11.02%16.67%
Total98100.00%15100.00%
Information contained on this website is for historical information purposes only and does not indicate or represent copyright ownership.