src/hotspot/share/runtime/safepoint.hpp
changeset 49333 489f1dd40582
parent 49169 af8578e25d17
child 49816 a3e79f97e86b
equal deleted inserted replaced
49332:cd21aff24069 49333:489f1dd40582
   207   static void set_defer_thr_suspend_loop_count() {
   207   static void set_defer_thr_suspend_loop_count() {
   208     _defer_thr_suspend_loop_count = 1;
   208     _defer_thr_suspend_loop_count = 1;
   209   }
   209   }
   210 };
   210 };
   211 
   211 
       
   212 // Some helper assert macros for safepoint checks.
       
   213 
       
   214 #define assert_at_safepoint()                                           \
       
   215   assert(SafepointSynchronize::is_at_safepoint(), "should be at a safepoint")
       
   216 
       
   217 #define assert_at_safepoint_msg(...)                                    \
       
   218   assert(SafepointSynchronize::is_at_safepoint(), __VA_ARGS__)
       
   219 
       
   220 #define assert_not_at_safepoint()                                       \
       
   221   assert(!SafepointSynchronize::is_at_safepoint(), "should not be at a safepoint")
       
   222 
       
   223 #define assert_not_at_safepoint_msg(...)                                \
       
   224   assert(!SafepointSynchronize::is_at_safepoint(), __VA_ARGS__)
       
   225 
   212 // State class for a thread suspended at a safepoint
   226 // State class for a thread suspended at a safepoint
   213 class ThreadSafepointState: public CHeapObj<mtInternal> {
   227 class ThreadSafepointState: public CHeapObj<mtInternal> {
   214  public:
   228  public:
   215   // These states are maintained by VM thread while threads are being brought
   229   // These states are maintained by VM thread while threads are being brought
   216   // to a safepoint.  After SafepointSynchronize::end(), they are reset to
   230   // to a safepoint.  After SafepointSynchronize::end(), they are reset to