diff options
author | Keir Fraser <keir.fraser@citrix.com> | 2008-07-31 11:13:30 +0100 |
---|---|---|
committer | Keir Fraser <keir.fraser@citrix.com> | 2008-07-31 11:13:30 +0100 |
commit | 120785c177358d03f29b71f7314a0a8c5e5c3d32 (patch) | |
tree | db6fba880235c4f01c7fd6ad8a10515e489e3f7b /xen/include/xen/spinlock.h | |
parent | 1b45fb4c12d5eca59df6a532acd2b060d7c53f58 (diff) | |
download | xen-120785c177358d03f29b71f7314a0a8c5e5c3d32.tar.gz xen-120785c177358d03f29b71f7314a0a8c5e5c3d32.tar.bz2 xen-120785c177358d03f29b71f7314a0a8c5e5c3d32.zip |
evtchn: Avoid spurious event-channel notifications across unbind/bind.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Signed-off-by: Huacai Chen <huacai.chen@intel.com>
Diffstat (limited to 'xen/include/xen/spinlock.h')
-rw-r--r-- | xen/include/xen/spinlock.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/xen/include/xen/spinlock.h b/xen/include/xen/spinlock.h index fa8c82f8ea..298211cb2a 100644 --- a/xen/include/xen/spinlock.h +++ b/xen/include/xen/spinlock.h @@ -85,8 +85,8 @@ typedef struct { int gcc_is_buggy; } rwlock_t; /* Ensure a lock is quiescent between two critical operations. */ static inline void spin_barrier(spinlock_t *lock) { - spin_lock(lock); - spin_unlock(lock); + do { mb(); } while ( spin_is_locked(lock) ); + mb(); } #define DEFINE_SPINLOCK(x) spinlock_t x = SPIN_LOCK_UNLOCKED |