diff options
| author | Linus Torvalds <torvalds@athlon.transmeta.com> | 2002-02-04 20:23:54 -0800 |
|---|---|---|
| committer | Linus Torvalds <torvalds@athlon.transmeta.com> | 2002-02-04 20:23:54 -0800 |
| commit | ad8dcf57e93e8e5f9b815e786da35ef03fc70f89 (patch) | |
| tree | f3394afd32c183a41ccbc649859ad505c5e8c09c /include/linux/spinlock.h | |
| parent | 4c7ed1860c0d21292284fb044c465ba00ce89b7f (diff) | |
v2.4.12 -> v2.4.12.1
- Trond Myklebust: deadlock checking in lockd server
- Tim Waugh: fix up parport wrong #define
- Christoph Hellwig: i2c update, ext2 cleanup
- Al Viro: fix partition handling sanity check.
- Trond Myklebust: make NFS use SLAB_NOFS, and not play games with PF_MEMALLOC
- Ben Fennema: UDF update
- Alan Cox: continued merging
- Chris Mason: get /proc buffer memory sizes right after buf-in-page-cache
Diffstat (limited to 'include/linux/spinlock.h')
| -rw-r--r-- | include/linux/spinlock.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/linux/spinlock.h b/include/linux/spinlock.h index 059329c7759e..440ba7df43ec 100644 --- a/include/linux/spinlock.h +++ b/include/linux/spinlock.h @@ -30,6 +30,10 @@ #define write_unlock_irqrestore(lock, flags) do { write_unlock(lock); local_irq_restore(flags); } while (0) #define write_unlock_irq(lock) do { write_unlock(lock); local_irq_enable(); } while (0) #define write_unlock_bh(lock) do { write_unlock(lock); local_bh_enable(); } while (0) +#define spin_trylock_bh(lock) ({ int __r; local_bh_disable();\ + __r = spin_trylock(lock); \ + if (!__r) local_bh_enable(); \ + __r; }) #ifdef CONFIG_SMP #include <asm/spinlock.h> |
