Back to home page

OSCL-LXR

 
 

    


0001 /*
0002  * This file is subject to the terms and conditions of the GNU General Public
0003  * License.  See the file "COPYING" in the main directory of this archive
0004  * for more details.
0005  *
0006  * Copyright (C) 1999, 2000, 06 Ralf Baechle (ralf@linux-mips.org)
0007  * Copyright (C) 1999, 2000 Silicon Graphics, Inc.
0008  */
0009 #ifndef _ASM_SPINLOCK_H
0010 #define _ASM_SPINLOCK_H
0011 
0012 #include <asm/processor.h>
0013 
0014 #include <asm-generic/qspinlock_types.h>
0015 
0016 #define queued_spin_unlock queued_spin_unlock
0017 /**
0018  * queued_spin_unlock - release a queued spinlock
0019  * @lock : Pointer to queued spinlock structure
0020  */
0021 static inline void queued_spin_unlock(struct qspinlock *lock)
0022 {
0023     /* This could be optimised with ARCH_HAS_MMIOWB */
0024     mmiowb();
0025     smp_store_release(&lock->locked, 0);
0026 }
0027 
0028 #include <asm/qspinlock.h>
0029 #include <asm/qrwlock.h>
0030 
0031 #endif /* _ASM_SPINLOCK_H */