https://github.com/torvalds/linux
Raw File
Tip revision: 5ecd3100e695228ac5e0ce0e325e252c0f11806f authored by Linus Torvalds on 05 June 2007, 00:57:25 UTC
Linux 2.6.22-rc4
Tip revision: 5ecd310
spinlock_types.h
#ifndef __ASM_SH_SPINLOCK_TYPES_H
#define __ASM_SH_SPINLOCK_TYPES_H

#ifndef __LINUX_SPINLOCK_TYPES_H
# error "please don't include this file directly"
#endif

typedef struct {
	volatile unsigned long lock;
} raw_spinlock_t;

#define __RAW_SPIN_LOCK_UNLOCKED	{ 1 }

#include <asm/atomic.h>

typedef struct {
	raw_spinlock_t lock;
	atomic_t counter;
} raw_rwlock_t;

#define RW_LOCK_BIAS			0x01000000
#define __RAW_RW_LOCK_UNLOCKED		{ { 0 }, { RW_LOCK_BIAS } }

#endif
back to top