diff options
author | Keir Fraser <keir.fraser@citrix.com> | 2008-10-22 15:06:01 +0100 |
---|---|---|
committer | Keir Fraser <keir.fraser@citrix.com> | 2008-10-22 15:06:01 +0100 |
commit | 828dfa9ef2bb3dae3ee29cccbe3d4d75bf56b8a6 (patch) | |
tree | ccf08c9ffaa14b3cee443be3ffca637202fabbf3 /xen/common/spinlock.c | |
parent | cdd644ce1082849d20832902d8d5a69b854f8cbe (diff) | |
download | xen-828dfa9ef2bb3dae3ee29cccbe3d4d75bf56b8a6.tar.gz xen-828dfa9ef2bb3dae3ee29cccbe3d4d75bf56b8a6.tar.bz2 xen-828dfa9ef2bb3dae3ee29cccbe3d4d75bf56b8a6.zip |
Define spin_barrier_irq() for IRQ-safe spinlocks, and use it for virq_lock.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Diffstat (limited to 'xen/common/spinlock.c')
-rw-r--r-- | xen/common/spinlock.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/xen/common/spinlock.c b/xen/common/spinlock.c index 15420ebfe7..125e12d1bf 100644 --- a/xen/common/spinlock.c +++ b/xen/common/spinlock.c @@ -54,6 +54,14 @@ void _spin_barrier(spinlock_t *lock) mb(); } +void _spin_barrier_irq(spinlock_t *lock) +{ + unsigned long flags; + local_irq_save(flags); + _spin_barrier(lock); + local_irq_restore(flags); +} + void _spin_lock_recursive(spinlock_t *lock) { int cpu = smp_processor_id(); |