src/hotspot/share/runtime/thread.cpp
changeset 52955 f0f3dc30e3bb
parent 52896 98408c7c0b73
child 53084 293cec2f7670
equal deleted inserted replaced
52954:799e964e32b6 52955:f0f3dc30e3bb
   304            this == align_up(_real_malloc_address, (int)markOopDesc::biased_lock_alignment),
   304            this == align_up(_real_malloc_address, (int)markOopDesc::biased_lock_alignment),
   305            "bug in forced alignment of thread objects");
   305            "bug in forced alignment of thread objects");
   306   }
   306   }
   307 #endif // ASSERT
   307 #endif // ASSERT
   308 
   308 
   309   // Notify the barrier set that a thread is being created. Note that some
   309   // Notify the barrier set that a thread is being created. The initial
   310   // threads are created before a barrier set is available. The call to
   310   // thread is created before the barrier set is available.  The call to
   311   // BarrierSet::on_thread_create() for these threads is therefore deferred
   311   // BarrierSet::on_thread_create() for this thread is therefore deferred
   312   // to BarrierSet::set_barrier_set().
   312   // to BarrierSet::set_barrier_set().
   313   BarrierSet* const barrier_set = BarrierSet::barrier_set();
   313   BarrierSet* const barrier_set = BarrierSet::barrier_set();
   314   if (barrier_set != NULL) {
   314   if (barrier_set != NULL) {
   315     barrier_set->on_thread_create(this);
   315     barrier_set->on_thread_create(this);
   316   } else {
   316   } else {
   317     DEBUG_ONLY(Threads::inc_threads_before_barrier_set();)
   317 #ifdef ASSERT
       
   318     static bool initial_thread_created = false;
       
   319     assert(!initial_thread_created, "creating thread before barrier set");
       
   320     initial_thread_created = true;
       
   321 #endif // ASSERT
   318   }
   322   }
   319 }
   323 }
   320 
   324 
   321 void Thread::initialize_thread_current() {
   325 void Thread::initialize_thread_current() {
   322 #ifndef USE_LIBRARY_BASED_TLS_ONLY
   326 #ifndef USE_LIBRARY_BASED_TLS_ONLY
  3393 int         Threads::_thread_claim_parity = 0;
  3397 int         Threads::_thread_claim_parity = 0;
  3394 size_t      JavaThread::_stack_size_at_create = 0;
  3398 size_t      JavaThread::_stack_size_at_create = 0;
  3395 
  3399 
  3396 #ifdef ASSERT
  3400 #ifdef ASSERT
  3397 bool        Threads::_vm_complete = false;
  3401 bool        Threads::_vm_complete = false;
  3398 size_t      Threads::_threads_before_barrier_set = 0;
       
  3399 #endif
  3402 #endif
  3400 
  3403 
  3401 static inline void *prefetch_and_load_ptr(void **addr, intx prefetch_interval) {
  3404 static inline void *prefetch_and_load_ptr(void **addr, intx prefetch_interval) {
  3402   Prefetch::read((void*)addr, prefetch_interval);
  3405   Prefetch::read((void*)addr, prefetch_interval);
  3403   return *addr;
  3406   return *addr;