blob: 1a33608c958b90fa0bd43aebd019c884389afa41 [file] [log] [blame]
Robin Getz96f10502009-09-24 14:11:24 +00001/*
2 * Copyright 2008 Analog Devices Inc.
3 *
4 * Licensed under the GPL-2 or later.
5 */
6
Graf Yang6b3087c2009-01-07 23:14:39 +08007#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
16typedef struct {
17 volatile unsigned int lock;
Thomas Gleixner445c8952009-12-02 19:49:50 +010018} arch_spinlock_t;
Graf Yang6b3087c2009-01-07 23:14:39 +080019
Thomas Gleixneredc35bd2009-12-03 12:38:57 +010020#define __ARCH_SPIN_LOCK_UNLOCKED { 0 }
Graf Yang6b3087c2009-01-07 23:14:39 +080021
22typedef struct {
23 volatile unsigned int lock;
Thomas Gleixnerfb3a6bb2009-12-03 20:01:19 +010024} arch_rwlock_t;
Graf Yang6b3087c2009-01-07 23:14:39 +080025
Thomas Gleixnerfb3a6bb2009-12-03 20:01:19 +010026#define __ARCH_RW_LOCK_UNLOCKED { RW_LOCK_BIAS }
Graf Yang6b3087c2009-01-07 23:14:39 +080027
28#endif