mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] Replace _spin_trylock with spin_trylock in the IRQ variants to use __cond_lock
@ 2006-08-23  0:52 Josh Triplett
  0 siblings, 0 replies; only message in thread
From: Josh Triplett @ 2006-08-23  0:52 UTC (permalink / raw)
  To: linux-kernel; +Cc: Andrew Morton

spin_trylock_irq and spin_trylock_irqsave use _spin_trylock, which does not
use the __cond_lock wrapper annotation and thus does not affect the lock
context; change them to use spin_trylock instead, which does use __cond_lock.

Signed-off-by: Josh Triplett <josh@freedesktop.org>
---
 include/linux/spinlock.h |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/linux/spinlock.h b/include/linux/spinlock.h
index 31473db..456e74f 100644
--- a/include/linux/spinlock.h
+++ b/include/linux/spinlock.h
@@ -241,14 +241,14 @@ #define spin_trylock_bh(lock)		__cond_lo
 #define spin_trylock_irq(lock) \
 ({ \
 	local_irq_disable(); \
-	_spin_trylock(lock) ? \
+	spin_trylock(lock) ? \
 	1 : ({ local_irq_enable(); 0;  }); \
 })
 
 #define spin_trylock_irqsave(lock, flags) \
 ({ \
 	local_irq_save(flags); \
-	_spin_trylock(lock) ? \
+	spin_trylock(lock) ? \
 	1 : ({ local_irq_restore(flags); 0; }); \
 })
 
-- 
1.4.1.1



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2006-08-23  0:51 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-08-23  0:52 [PATCH] Replace _spin_trylock with spin_trylock in the IRQ variants to use __cond_lock Josh Triplett

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®