Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 158732
b: refs/heads/master
c: 2496afb
h: refs/heads/master
v: v3
  • Loading branch information
Yang Xiaowei authored and Jeremy Fitzhardinge committed Sep 9, 2009
1 parent 4b580a5 commit 6071cba
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 4d576b57b50a92801e6493e76e5243d6cff193d2
refs/heads/master: 2496afbf1e50c70f80992656bcb730c8583ddac3
9 changes: 7 additions & 2 deletions trunk/arch/x86/xen/spinlock.c
Original file line number Diff line number Diff line change
Expand Up @@ -326,8 +326,13 @@ static void xen_spin_unlock(struct raw_spinlock *lock)
smp_wmb(); /* make sure no writes get moved after unlock */
xl->lock = 0; /* release lock */

/* make sure unlock happens before kick */
barrier();
/*
* Make sure unlock happens before checking for waiting
* spinners. We need a strong barrier to enforce the
* write-read ordering to different memory locations, as the
* CPU makes no implied guarantees about their ordering.
*/
mb();

if (unlikely(xl->spinners))
xen_spin_unlock_slow(xl);
Expand Down

0 comments on commit 6071cba

Please sign in to comment.