]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - include/linux/spinlock.h
[TCP]: Allow minimum RTO to be configurable via routing metrics.
[linux-2.6-omap-h63xx.git] / include / linux / spinlock.h
index a946176db638c7198705a20a7d2fd715279dfc2d..c376f3b36c8980c9b434cabc693e7ef9b4ab43f3 100644 (file)
@@ -282,6 +282,13 @@ do {                                               \
        1 : ({ local_irq_restore(flags); 0; }); \
 })
 
+#define write_trylock_irqsave(lock, flags) \
+({ \
+       local_irq_save(flags); \
+       write_trylock(lock) ? \
+       1 : ({ local_irq_restore(flags); 0; }); \
+})
+
 /*
  * Locks two spinlocks l1 and l2.
  * l1_first indicates if spinlock l1 should be taken first.