Permalink
Browse files

Setup memory barrier when installing handle

  • Loading branch information...
1 parent c188bd6 commit d7020621d42f4ae90de34a9bf70d110515121503 @dbussink dbussink committed Oct 5, 2012
Showing with 3 additions and 0 deletions.
  1. +3 −0 vm/oop.cpp
View
@@ -34,6 +34,9 @@ namespace rubinius {
new_val.all_flags = ih;
new_val.f.inflated = 1;
+ // Make sure to include a barrier to the header is all properly initialized
+ atomic::memory_barrier();
+
// Do a spin update so if someone else is trying to update it at the same time
// we catch that and keep trying until we get our version in.
while(!header.atomic_set(orig, new_val)) {

0 comments on commit d702062

Please sign in to comment.