src/hotspot/share/runtime/threadSMR.cpp
changeset 59156 14fa9e70ae71
parent 58579 05dd6144d434
child 59247 56bf71d64d51
equal deleted inserted replaced
59154:0c2e1808f800 59156:14fa9e70ae71
   599 
   599 
   600   return new_list;
   600   return new_list;
   601 }
   601 }
   602 
   602 
   603 void ThreadsList::dec_nested_handle_cnt() {
   603 void ThreadsList::dec_nested_handle_cnt() {
   604   // The decrement only needs to be MO_ACQ_REL since the reference
       
   605   // counter is volatile (and the hazard ptr is already NULL).
       
   606   Atomic::dec(&_nested_handle_cnt);
   604   Atomic::dec(&_nested_handle_cnt);
   607 }
   605 }
   608 
   606 
   609 int ThreadsList::find_index_of_JavaThread(JavaThread *target) {
   607 int ThreadsList::find_index_of_JavaThread(JavaThread *target) {
   610   if (target == NULL) {
   608   if (target == NULL) {
   644   }
   642   }
   645   return NULL;
   643   return NULL;
   646 }
   644 }
   647 
   645 
   648 void ThreadsList::inc_nested_handle_cnt() {
   646 void ThreadsList::inc_nested_handle_cnt() {
   649   // The increment needs to be MO_SEQ_CST so that the reference counter
       
   650   // update is seen before the subsequent hazard ptr update.
       
   651   Atomic::inc(&_nested_handle_cnt);
   647   Atomic::inc(&_nested_handle_cnt);
   652 }
   648 }
   653 
   649 
   654 bool ThreadsList::includes(const JavaThread * const p) const {
   650 bool ThreadsList::includes(const JavaThread * const p) const {
   655   if (p == NULL) {
   651   if (p == NULL) {