< prev index next >

src/hotspot/share/runtime/threadSMR.cpp

Print this page




 139 
 140 inline void ThreadsSMRSupport::inc_deleted_thread_cnt() {
 141   Atomic::inc(&_deleted_thread_cnt);
 142 }
 143 
 144 inline void ThreadsSMRSupport::inc_java_thread_list_alloc_cnt() {
 145   _java_thread_list_alloc_cnt++;
 146 }
 147 
 148 inline bool ThreadsSMRSupport::is_bootstrap_list(ThreadsList* list) {
 149   return list == &_bootstrap_list;
 150 }
 151 
 152 inline void ThreadsSMRSupport::update_deleted_thread_time_max(uint new_value) {
 153   while (true) {
 154     uint cur_value = _deleted_thread_time_max;
 155     if (new_value <= cur_value) {
 156       // No need to update max value so we're done.
 157       break;
 158     }
 159     if (Atomic::cmpxchg(new_value, &_deleted_thread_time_max, cur_value) == cur_value) {
 160       // Updated max value so we're done. Otherwise try it all again.
 161       break;
 162     }
 163   }
 164 }
 165 
 166 inline void ThreadsSMRSupport::update_java_thread_list_max(uint new_value) {
 167   if (new_value > _java_thread_list_max) {
 168     _java_thread_list_max = new_value;
 169   }
 170 }
 171 
 172 inline ThreadsList* ThreadsSMRSupport::xchg_java_thread_list(ThreadsList* new_list) {
 173   return (ThreadsList*)Atomic::xchg(&_java_thread_list, new_list);
 174 }
 175 
 176 // Hash table of pointers found by a scan. Used for collecting hazard
 177 // pointers (ThreadsList references). Also used for collecting JavaThreads
 178 // that are indirectly referenced by hazard ptrs. An instance of this
 179 // class only contains one type of pointer.




 139 
 140 inline void ThreadsSMRSupport::inc_deleted_thread_cnt() {
 141   Atomic::inc(&_deleted_thread_cnt);
 142 }
 143 
 144 inline void ThreadsSMRSupport::inc_java_thread_list_alloc_cnt() {
 145   _java_thread_list_alloc_cnt++;
 146 }
 147 
 148 inline bool ThreadsSMRSupport::is_bootstrap_list(ThreadsList* list) {
 149   return list == &_bootstrap_list;
 150 }
 151 
 152 inline void ThreadsSMRSupport::update_deleted_thread_time_max(uint new_value) {
 153   while (true) {
 154     uint cur_value = _deleted_thread_time_max;
 155     if (new_value <= cur_value) {
 156       // No need to update max value so we're done.
 157       break;
 158     }
 159     if (Atomic::cmpxchg(&_deleted_thread_time_max, cur_value, new_value) == cur_value) {
 160       // Updated max value so we're done. Otherwise try it all again.
 161       break;
 162     }
 163   }
 164 }
 165 
 166 inline void ThreadsSMRSupport::update_java_thread_list_max(uint new_value) {
 167   if (new_value > _java_thread_list_max) {
 168     _java_thread_list_max = new_value;
 169   }
 170 }
 171 
 172 inline ThreadsList* ThreadsSMRSupport::xchg_java_thread_list(ThreadsList* new_list) {
 173   return (ThreadsList*)Atomic::xchg(&_java_thread_list, new_list);
 174 }
 175 
 176 // Hash table of pointers found by a scan. Used for collecting hazard
 177 // pointers (ThreadsList references). Also used for collecting JavaThreads
 178 // that are indirectly referenced by hazard ptrs. An instance of this
 179 // class only contains one type of pointer.


< prev index next >