src/hotspot/share/gc/shared/barrierSet.cpp
changeset 49752 93d84f667d12
parent 49748 6a880e576856
child 51600 56309b1b9d9b
equal deleted inserted replaced
49751:c3a10df652c0 49752:93d84f667d12
    23  */
    23  */
    24 
    24 
    25 #include "precompiled.hpp"
    25 #include "precompiled.hpp"
    26 #include "gc/shared/barrierSet.hpp"
    26 #include "gc/shared/barrierSet.hpp"
    27 #include "gc/shared/barrierSetAssembler.hpp"
    27 #include "gc/shared/barrierSetAssembler.hpp"
       
    28 #include "runtime/thread.hpp"
    28 #include "utilities/macros.hpp"
    29 #include "utilities/macros.hpp"
    29 
    30 
    30 BarrierSet* BarrierSet::_bs = NULL;
    31 BarrierSet* BarrierSet::_barrier_set = NULL;
       
    32 
       
    33 void BarrierSet::set_barrier_set(BarrierSet* barrier_set) {
       
    34   assert(_barrier_set == NULL, "Already initialized");
       
    35   _barrier_set = barrier_set;
       
    36 
       
    37   // The barrier set was not initialized when the this thread (the main thread)
       
    38   // was created, so the call to BarrierSet::on_thread_create() had to be deferred
       
    39   // until we have a barrier set. Now we have a barrier set, so we make the call.
       
    40   _barrier_set->on_thread_create(Thread::current());
       
    41 }
    31 
    42 
    32 // Called from init.cpp
    43 // Called from init.cpp
    33 void gc_barrier_stubs_init() {
    44 void gc_barrier_stubs_init() {
    34   BarrierSet* bs = BarrierSet::barrier_set();
    45   BarrierSet* bs = BarrierSet::barrier_set();
    35 #ifndef ZERO
    46 #ifndef ZERO