[openib-general] [PATCH RFC 14/21] ofed_1_2 Add spin_trylock_irq() for cxgb3 support
Steve Wise
swise at opengridcomputing.com
Mon Jan 15 13:19:47 PST 2007
Add spin_trylock_irq() for cxgb3 support
Signed-off-by: Steve Wise <swise at opengridcomputing.com>
---
.../2.6.5_sles9_sp3/include/linux/spinlock.h | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/kernel_addons/backport/2.6.5_sles9_sp3/include/linux/spinlock.h b/kernel_addons/backport/2.6.5_sles9_sp3/include/linux/spinlock.h
index 449e0eb..00506f4 100644
--- a/kernel_addons/backport/2.6.5_sles9_sp3/include/linux/spinlock.h
+++ b/kernel_addons/backport/2.6.5_sles9_sp3/include/linux/spinlock.h
@@ -14,4 +14,11 @@ ({ \
#define spin_lock_nested(lock, subclass) spin_lock(lock)
+#define spin_trylock_irq(lock) \
+({ \
+ local_irq_disable(); \
+ spin_trylock(lock) ? \
+ 1 : ({ local_irq_enable(); 0; }); \
+})
+
#endif
More information about the general
mailing list