]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - include/linux/spinlock.h
locking: remove unused double_spin_lock()
[linux-2.6-omap-h63xx.git] / include / linux / spinlock.h
index 124449733c55a64595198aa8dc8eaf6a682189ca..d311a090fae7f38d999904d22e909700d86e3849 100644 (file)
@@ -71,7 +71,7 @@
 #define LOCK_SECTION_END                        \
         ".previous\n\t"
 
-#define __lockfunc fastcall __attribute__((section(".spinlock.text")))
+#define __lockfunc __attribute__((section(".spinlock.text")))
 
 /*
  * Pull the raw_spinlock_t and raw_rwlock_t definitions:
@@ -295,43 +295,6 @@ do {                                               \
        1 : ({ local_irq_restore(flags); 0; }); \
 })
 
-/*
- * Locks two spinlocks l1 and l2.
- * l1_first indicates if spinlock l1 should be taken first.
- */
-static inline void double_spin_lock(spinlock_t *l1, spinlock_t *l2,
-                                   bool l1_first)
-       __acquires(l1)
-       __acquires(l2)
-{
-       if (l1_first) {
-               spin_lock(l1);
-               spin_lock(l2);
-       } else {
-               spin_lock(l2);
-               spin_lock(l1);
-       }
-}
-
-/*
- * Unlocks two spinlocks l1 and l2.
- * l1_taken_first indicates if spinlock l1 was taken first and therefore
- * should be released after spinlock l2.
- */
-static inline void double_spin_unlock(spinlock_t *l1, spinlock_t *l2,
-                                     bool l1_taken_first)
-       __releases(l1)
-       __releases(l2)
-{
-       if (l1_taken_first) {
-               spin_unlock(l2);
-               spin_unlock(l1);
-       } else {
-               spin_unlock(l1);
-               spin_unlock(l2);
-       }
-}
-
 /*
  * Pull the atomic_t declaration:
  * (asm-mips/atomic.h needs above definitions)
@@ -341,6 +304,9 @@ static inline void double_spin_unlock(spinlock_t *l1, spinlock_t *l2,
  * atomic_dec_and_lock - lock on reaching reference count zero
  * @atomic: the atomic counter
  * @lock: the spinlock in question
+ *
+ * Decrements @atomic by 1.  If the result is 0, returns true and locks
+ * @lock.  Returns false for all other cases.
  */
 extern int _atomic_dec_and_lock(atomic_t *atomic, spinlock_t *lock);
 #define atomic_dec_and_lock(atomic, lock) \