Robin Getz | 96f1050 | 2009-09-24 14:11:24 +0000 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 2008 Analog Devices Inc. |
| 3 | * |
| 4 | * Licensed under the GPL-2 or later. |
| 5 | */ |
| 6 | |
Graf Yang | 6b3087c | 2009-01-07 23:14:39 +0800 | [diff] [blame] | 7 | #ifndef __ASM_SPINLOCK_TYPES_H |
| 8 | #define __ASM_SPINLOCK_TYPES_H |
| 9 | |
| 10 | #ifndef __LINUX_SPINLOCK_TYPES_H |
| 11 | # error "please don't include this file directly" |
| 12 | #endif |
| 13 | |
| 14 | #include <asm/rwlock.h> |
| 15 | |
| 16 | typedef struct { |
| 17 | volatile unsigned int lock; |
Thomas Gleixner | 445c895 | 2009-12-02 19:49:50 +0100 | [diff] [blame^] | 18 | } arch_spinlock_t; |
Graf Yang | 6b3087c | 2009-01-07 23:14:39 +0800 | [diff] [blame] | 19 | |
| 20 | #define __RAW_SPIN_LOCK_UNLOCKED { 0 } |
| 21 | |
| 22 | typedef struct { |
| 23 | volatile unsigned int lock; |
| 24 | } raw_rwlock_t; |
| 25 | |
| 26 | #define __RAW_RW_LOCK_UNLOCKED { RW_LOCK_BIAS } |
| 27 | |
| 28 | #endif |