aboutsummaryrefslogtreecommitdiffstats
path: root/xen/include/xen/spinlock.h
diff options
context:
space:
mode:
authorKeir Fraser <keir.fraser@citrix.com>2010-05-14 17:07:52 +0100
committerKeir Fraser <keir.fraser@citrix.com>2010-05-14 17:07:52 +0100
commit27c31d386746bea3daa5b3733c9f986a9c3cccc3 (patch)
tree64ef675ed9b4c0836ab9076b7280e88a64f5bb16 /xen/include/xen/spinlock.h
parent2e4146ddc277d2ddd861646b8b1ba83182eb84bb (diff)
downloadxen-27c31d386746bea3daa5b3733c9f986a9c3cccc3.tar.gz
xen-27c31d386746bea3daa5b3733c9f986a9c3cccc3.tar.bz2
xen-27c31d386746bea3daa5b3733c9f986a9c3cccc3.zip
Move cpu hotplug routines into common cpu.c file.
Also simplify the locking (reverting to use if spin_trylock, as returning EBUSY/EAGAIN seems unavoidable after all). In particular this should continue to ensure that stop_machine_run() does not have cpu_online_map change under its feet. Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Diffstat (limited to 'xen/include/xen/spinlock.h')
-rw-r--r--xen/include/xen/spinlock.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/xen/include/xen/spinlock.h b/xen/include/xen/spinlock.h
index e1f500c4ec..f6f737d756 100644
--- a/xen/include/xen/spinlock.h
+++ b/xen/include/xen/spinlock.h
@@ -146,6 +146,7 @@ int _spin_trylock(spinlock_t *lock);
void _spin_barrier(spinlock_t *lock);
void _spin_barrier_irq(spinlock_t *lock);
+int _spin_trylock_recursive(spinlock_t *lock);
void _spin_lock_recursive(spinlock_t *lock);
void _spin_unlock_recursive(spinlock_t *lock);
@@ -191,6 +192,7 @@ int _rw_is_write_locked(rwlock_t *lock);
* are any critical regions that cannot form part of such a set, they can use
* standard spin_[un]lock().
*/
+#define spin_trylock_recursive(l) _spin_trylock_recursive(l)
#define spin_lock_recursive(l) _spin_lock_recursive(l)
#define spin_unlock_recursive(l) _spin_unlock_recursive(l)