spinlock_types.h 510 字节
Newer Older
I
Ingo Molnar 已提交
1 2 3
#ifndef __SPARC_SPINLOCK_TYPES_H
#define __SPARC_SPINLOCK_TYPES_H

4 5 6 7
#ifdef CONFIG_QUEUED_SPINLOCKS
#include <asm-generic/qspinlock_types.h>
#else

I
Ingo Molnar 已提交
8
typedef struct {
9
	volatile unsigned char lock;
10
} arch_spinlock_t;
I
Ingo Molnar 已提交
11

12
#define __ARCH_SPIN_LOCK_UNLOCKED	{ 0 }
13
#endif /* CONFIG_QUEUED_SPINLOCKS */
I
Ingo Molnar 已提交
14

15 16 17
#ifdef CONFIG_QUEUED_RWLOCKS
#include <asm-generic/qrwlock_types.h>
#else
I
Ingo Molnar 已提交
18 19
typedef struct {
	volatile unsigned int lock;
20
} arch_rwlock_t;
I
Ingo Molnar 已提交
21

22
#define __ARCH_RW_LOCK_UNLOCKED		{ 0 }
23
#endif /* CONFIG_QUEUED_RWLOCKS */
I
Ingo Molnar 已提交
24
#endif