diff options
author | kfraser@localhost.localdomain <kfraser@localhost.localdomain> | 2007-03-29 15:14:26 +0100 |
---|---|---|
committer | kfraser@localhost.localdomain <kfraser@localhost.localdomain> | 2007-03-29 15:14:26 +0100 |
commit | 0491c8a6d26d25392b3b2458bea2b006bea88c7d (patch) | |
tree | e067e26bb77c21b0b587451012512f0edcdde25a /xen/include/xen/spinlock.h | |
parent | fbe52a1dd15dae010f1213213303ac58267a78f0 (diff) | |
download | xen-0491c8a6d26d25392b3b2458bea2b006bea88c7d.tar.gz xen-0491c8a6d26d25392b3b2458bea2b006bea88c7d.tar.bz2 xen-0491c8a6d26d25392b3b2458bea2b006bea88c7d.zip |
xen: Split domain_flags into discrete first-class fields in the
domain structure. This makes them quicker to access, and simplifies
domain pause and checking of runnable status.
Signed-off-by: Keir Fraser <keir@xensource.com>
Diffstat (limited to 'xen/include/xen/spinlock.h')
-rw-r--r-- | xen/include/xen/spinlock.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/xen/include/xen/spinlock.h b/xen/include/xen/spinlock.h index 11f83119d4..fa8c82f8ea 100644 --- a/xen/include/xen/spinlock.h +++ b/xen/include/xen/spinlock.h @@ -82,6 +82,13 @@ typedef struct { int gcc_is_buggy; } rwlock_t; #define write_lock(_lock) _raw_write_lock(_lock) #define write_unlock(_lock) _raw_write_unlock(_lock) +/* Ensure a lock is quiescent between two critical operations. */ +static inline void spin_barrier(spinlock_t *lock) +{ + spin_lock(lock); + spin_unlock(lock); +} + #define DEFINE_SPINLOCK(x) spinlock_t x = SPIN_LOCK_UNLOCKED #define DEFINE_RWLOCK(x) rwlock_t x = RW_LOCK_UNLOCKED |