diff options
author | dgilbert <dgilbert@us.ibm.com> | 2011-07-15 10:43:57 -0500 |
---|---|---|
committer | A. Patrick Williams III <iawillia@us.ibm.com> | 2011-07-15 11:00:30 -0500 |
commit | 62faccd737f97dd4c485770f59bacf1b44dcbc3b (patch) | |
tree | 9fff21486c84ea144ddc222460a5f150872ef212 /src/lib | |
parent | 1291feb17fa04747795bf5cff72599fa3733d45f (diff) | |
download | talos-hostboot-62faccd737f97dd4c485770f59bacf1b44dcbc3b.tar.gz talos-hostboot-62faccd737f97dd4c485770f59bacf1b44dcbc3b.zip |
fix mutex_unlock weak consitency bug
Change-Id: Id73831f647cd07f6a12848dac9e45b2dc6c67f62
Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/201
Tested-by: Jenkins Server
Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/sync.C | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/lib/sync.C b/src/lib/sync.C index 788ecb1c4..233801ceb 100644 --- a/src/lib/sync.C +++ b/src/lib/sync.C @@ -1,3 +1,4 @@ +#include <arch/ppc.H> #include <sys/sync.h> #include <sys/syscall.h> #include <assert.h> @@ -138,6 +139,7 @@ void mutex_unlock(mutex_t * i_mutex) } #endif // #idea 2 + lwsync(); uint64_t l_count = __sync_lock_test_and_set(&(i_mutex->iv_val),0); if(2 == l_count) { |