linux/kernel/locking/spinlock_debug.c

/*
 * Copyright 2005, Red Hat, Inc., Ingo Molnar
 * Released under the General Public License (GPL).
 *
 * This file contains the spinlock/rwlock implementations for
 * DEBUG_SPINLOCK.
 */

#include <linux/spinlock.h>
#include <linux/nmi.h>
#include <linux/interrupt.h>
#include <linux/debug_locks.h>
#include <linux/delay.h>
#include <linux/export.h>
#include <linux/pid.h>

void __raw_spin_lock_init(raw_spinlock_t *lock, const char *name,
			  struct lock_class_key *key, short inner)
{}

EXPORT_SYMBOL();

#ifndef CONFIG_PREEMPT_RT
void __rwlock_init(rwlock_t *lock, const char *name,
		   struct lock_class_key *key)
{}

EXPORT_SYMBOL();
#endif

static void spin_dump(raw_spinlock_t *lock, const char *msg)
{}

static void spin_bug(raw_spinlock_t *lock, const char *msg)
{}

#define SPIN_BUG_ON(cond, lock, msg)

static inline void
debug_spin_lock_before(raw_spinlock_t *lock)
{}

static inline void debug_spin_lock_after(raw_spinlock_t *lock)
{}

static inline void debug_spin_unlock(raw_spinlock_t *lock)
{}

/*
 * We are now relying on the NMI watchdog to detect lockup instead of doing
 * the detection here with an unfair lock which can cause problem of its own.
 */
void do_raw_spin_lock(raw_spinlock_t *lock)
{}

int do_raw_spin_trylock(raw_spinlock_t *lock)
{}

void do_raw_spin_unlock(raw_spinlock_t *lock)
{}

#ifndef CONFIG_PREEMPT_RT
static void rwlock_bug(rwlock_t *lock, const char *msg)
{}

#define RWLOCK_BUG_ON(cond, lock, msg)

void do_raw_read_lock(rwlock_t *lock)
{}

int do_raw_read_trylock(rwlock_t *lock)
{}

void do_raw_read_unlock(rwlock_t *lock)
{}

static inline void debug_write_lock_before(rwlock_t *lock)
{}

static inline void debug_write_lock_after(rwlock_t *lock)
{}

static inline void debug_write_unlock(rwlock_t *lock)
{}

void do_raw_write_lock(rwlock_t *lock)
{}

int do_raw_write_trylock(rwlock_t *lock)
{}

void do_raw_write_unlock(rwlock_t *lock)
{}

#endif /* !CONFIG_PREEMPT_RT */