Remove unused spin_trylock() function
authorPeter Maydell <peter.maydell@linaro.org>
Wed, 1 Dec 2010 19:44:38 +0000 (19:44 +0000)
committerBlue Swirl <blauwirbel@gmail.com>
Sat, 4 Dec 2010 21:21:28 +0000 (21:21 +0000)
Remove the spin_trylock() function, as it is not used anywhere,
and is not even implemented if CONFIG_USE_NPTL is defined.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
qemu-lock.h

index 9a3e6acce8e433bdd92a57f392df634e3e07b415..65ca0843265452297de9645025248365662cd52d 100644 (file)
@@ -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