src/hotspot/share/runtime/mutex.cpp
changeset 47881 0ce0ac68ace7
parent 47634 6a0c42c40cd1
child 48488 51825789dd89
equal deleted inserted replaced
47824:cf127be65014 47881:0ce0ac68ace7
    26 #include "runtime/atomic.hpp"
    26 #include "runtime/atomic.hpp"
    27 #include "runtime/interfaceSupport.hpp"
    27 #include "runtime/interfaceSupport.hpp"
    28 #include "runtime/mutex.hpp"
    28 #include "runtime/mutex.hpp"
    29 #include "runtime/orderAccess.inline.hpp"
    29 #include "runtime/orderAccess.inline.hpp"
    30 #include "runtime/osThread.hpp"
    30 #include "runtime/osThread.hpp"
       
    31 #include "runtime/safepointMechanism.inline.hpp"
    31 #include "runtime/thread.inline.hpp"
    32 #include "runtime/thread.inline.hpp"
    32 #include "utilities/events.hpp"
    33 #include "utilities/events.hpp"
    33 #include "utilities/macros.hpp"
    34 #include "utilities/macros.hpp"
    34 
    35 
    35 // o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o
    36 // o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o
   392     Steps += Delay;
   393     Steps += Delay;
   393     if (Self != NULL) {
   394     if (Self != NULL) {
   394       jint rv = Self->rng[0];
   395       jint rv = Self->rng[0];
   395       for (int k = Delay; --k >= 0;) {
   396       for (int k = Delay; --k >= 0;) {
   396         rv = MarsagliaXORV(rv);
   397         rv = MarsagliaXORV(rv);
   397         if ((flgs & 4) == 0 && SafepointSynchronize::do_call_back()) return 0;
   398         if ((flgs & 4) == 0 && SafepointMechanism::poll(Self)) return 0;
   398       }
   399       }
   399       Self->rng[0] = rv;
   400       Self->rng[0] = rv;
   400     } else {
   401     } else {
   401       Stall(Delay);
   402       Stall(Delay);
   402     }
   403     }