Skip to contentSkip to conversation

Remove unused spin_trylock() function

PATCH Applied Peter Maydell 2 participants 2 messages Dec 1, 2010 – Dec 5, 2010

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Remove unused spin_trylock() function

Remove the spin_trylock() function, as it is not used anywhere, and is not even implemented if CONFIG_USE_NPTL is defined.

---
 qemu-lock.h |   10 ----------
 1 files changed, 0 insertions(+), 10 deletions(-)
qemu-lock.h +0 -10
index 9a3e6ac..65ca084 100644
@@ -224,11 +224,6 @@ static inline void spin_unlock(spinlock_t *lock)
 {
     resetlock(lock);
 }
-
-static inline int spin_trylock(spinlock_t *lock)
-{
-    return !testandset(lock);
-}
 #else
 static inline void spin_lock(spinlock_t *lock)
 {
@@ -237,11 +232,6 @@ static inline void spin_lock(spinlock_t *lock)
 static inline void spin_unlock(spinlock_t *lock)
 {
 }
-
-static inline int spin_trylock(spinlock_t *lock)
-{
-    return 1;
-}
 #endif
 
 #endif
Signature · 1 line
1.7.1
Applied
#1 lore raw

Thanks, applied.

Quoted 41 lines · Peter Maydell

Remove the spin_trylock() function, as it is not used anywhere, and is not even implemented if CONFIG_USE_NPTL is defined.

---
 qemu-lock.h |   10 ----------

 1 files changed, 0 insertions(+), 10 deletions(-)
qemu-lock.h +0 -11
index 9a3e6ac..65ca084 100644
@@ -224,11 +224,6 @@ static inline void spin_unlock(spinlock_t *lock)
  {
     resetlock(lock);
  }
-
-static inline int spin_trylock(spinlock_t *lock)
-{
-    return !testandset(lock);
-}
  #else
  static inline void spin_lock(spinlock_t *lock)
  {
@@ -237,11 +232,6 @@ static inline void spin_lock(spinlock_t *lock)
  static inline void spin_unlock(spinlock_t *lock)
  {
  }
-
-static inline int spin_trylock(spinlock_t *lock)
-{
-    return 1;
-}
  #endif
 
  #endif
--

1.7.1