< prev index next >

src/hotspot/share/memory/universe.cpp

Print this page




 519   if (Thread::current()->is_VM_thread()) {
 520     assert_pll_locked(is_locked);
 521   } else {
 522     assert_pll_ownership();
 523   }
 524   return _reference_pending_list;
 525 }
 526 
 527 void Universe::set_reference_pending_list(oop list) {
 528   assert_pll_ownership();
 529   _reference_pending_list = list;
 530 }
 531 
 532 bool Universe::has_reference_pending_list() {
 533   assert_pll_ownership();
 534   return _reference_pending_list != NULL;
 535 }
 536 
 537 oop Universe::swap_reference_pending_list(oop list) {
 538   assert_pll_locked(is_locked);
 539   return (oop)Atomic::xchg_ptr(list, &_reference_pending_list);
 540 }
 541 
 542 #undef assert_pll_locked
 543 #undef assert_pll_ownership
 544 
 545 
 546 static bool has_run_finalizers_on_exit = false;
 547 
 548 void Universe::run_finalizers_on_exit() {
 549   if (has_run_finalizers_on_exit) return;
 550   has_run_finalizers_on_exit = true;
 551 
 552   // Called on VM exit. This ought to be run in a separate thread.
 553   log_trace(ref)("Callback to run finalizers on exit");
 554   {
 555     PRESERVE_EXCEPTION_MARK;
 556     Klass* finalizer_klass = SystemDictionary::Finalizer_klass();
 557     JavaValue result(T_VOID);
 558     JavaCalls::call_static(
 559       &result,




 519   if (Thread::current()->is_VM_thread()) {
 520     assert_pll_locked(is_locked);
 521   } else {
 522     assert_pll_ownership();
 523   }
 524   return _reference_pending_list;
 525 }
 526 
 527 void Universe::set_reference_pending_list(oop list) {
 528   assert_pll_ownership();
 529   _reference_pending_list = list;
 530 }
 531 
 532 bool Universe::has_reference_pending_list() {
 533   assert_pll_ownership();
 534   return _reference_pending_list != NULL;
 535 }
 536 
 537 oop Universe::swap_reference_pending_list(oop list) {
 538   assert_pll_locked(is_locked);
 539   return Atomic::xchg(list, &_reference_pending_list);
 540 }
 541 
 542 #undef assert_pll_locked
 543 #undef assert_pll_ownership
 544 
 545 
 546 static bool has_run_finalizers_on_exit = false;
 547 
 548 void Universe::run_finalizers_on_exit() {
 549   if (has_run_finalizers_on_exit) return;
 550   has_run_finalizers_on_exit = true;
 551 
 552   // Called on VM exit. This ought to be run in a separate thread.
 553   log_trace(ref)("Callback to run finalizers on exit");
 554   {
 555     PRESERVE_EXCEPTION_MARK;
 556     Klass* finalizer_klass = SystemDictionary::Finalizer_klass();
 557     JavaValue result(T_VOID);
 558     JavaCalls::call_static(
 559       &result,


< prev index next >