All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] Remove unused spin_trylock() function
@ 2010-12-01 19:44 Peter Maydell
  2010-12-05  8:23 ` Blue Swirl
  0 siblings, 1 reply; 2+ messages in thread
From: Peter Maydell @ 2010-12-01 19:44 UTC (permalink / raw)
  To: qemu-devel

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>
---
 qemu-lock.h |   10 ----------
 1 files changed, 0 insertions(+), 10 deletions(-)

diff --git a/qemu-lock.h b/qemu-lock.h
index 9a3e6ac..65ca084 100644
--- a/qemu-lock.h
+++ b/qemu-lock.h
@@ -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

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [Qemu-devel] [PATCH] Remove unused spin_trylock() function
  2010-12-01 19:44 [Qemu-devel] [PATCH] Remove unused spin_trylock() function Peter Maydell
@ 2010-12-05  8:23 ` Blue Swirl
  0 siblings, 0 replies; 2+ messages in thread
From: Blue Swirl @ 2010-12-05  8:23 UTC (permalink / raw)
  To: Peter Maydell; +Cc: qemu-devel

Thanks, applied.

On Wed, Dec 1, 2010 at 7:44 PM, Peter Maydell <peter.maydell@linaro.org> wrote:
> 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>
> ---
>  qemu-lock.h |   10 ----------
>  1 files changed, 0 insertions(+), 10 deletions(-)
>
> diff --git a/qemu-lock.h b/qemu-lock.h
> index 9a3e6ac..65ca084 100644
> --- a/qemu-lock.h
> +++ b/qemu-lock.h
> @@ -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
>
>
>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-12-05  8:23 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-12-01 19:44 [Qemu-devel] [PATCH] Remove unused spin_trylock() function Peter Maydell
2010-12-05  8:23 ` Blue Swirl

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.