[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-unstable] spinlock: Add assertions for lock_irq() variants.



# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1224684450 -3600
# Node ID ad39300ca063a36df3e1a020ea5546d61c08b2e5
# Parent  876618c33914861f3abce927001b0ffc98a203a9
spinlock: Add assertions for lock_irq() variants.
Signed-off-by: Keir Fraser <keir.fraser@xxxxxxxxxx>
---
 xen/common/spinlock.c |    3 +++
 1 files changed, 3 insertions(+)

diff -r 876618c33914 -r ad39300ca063 xen/common/spinlock.c
--- a/xen/common/spinlock.c     Wed Oct 22 15:06:01 2008 +0100
+++ b/xen/common/spinlock.c     Wed Oct 22 15:07:30 2008 +0100
@@ -9,6 +9,7 @@ void _spin_lock(spinlock_t *lock)
 
 void _spin_lock_irq(spinlock_t *lock)
 {
+    ASSERT(local_irq_is_enabled());
     local_irq_disable();
     _raw_spin_lock(&lock->raw);
 }
@@ -96,6 +97,7 @@ void _read_lock(rwlock_t *lock)
 
 void _read_lock_irq(rwlock_t *lock)
 {
+    ASSERT(local_irq_is_enabled());
     local_irq_disable();
     _raw_read_lock(&lock->raw);
 }
@@ -132,6 +134,7 @@ void _write_lock(rwlock_t *lock)
 
 void _write_lock_irq(rwlock_t *lock)
 {
+    ASSERT(local_irq_is_enabled());
     local_irq_disable();
     _raw_write_lock(&lock->raw);
 }

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.