WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

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

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] spinlock: Add assertions for lock_irq() variants.
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Thu, 23 Oct 2008 07:00:16 -0700
Delivery-date: Thu, 23 Oct 2008 07:00:41 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# 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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] spinlock: Add assertions for lock_irq() variants., Xen patchbot-unstable <=