158 // Query |
158 // Query |
159 inline static bool is_at_safepoint() { return _state == _synchronized; } |
159 inline static bool is_at_safepoint() { return _state == _synchronized; } |
160 inline static bool is_synchronizing() { return _state == _synchronizing; } |
160 inline static bool is_synchronizing() { return _state == _synchronizing; } |
161 inline static int safepoint_counter() { return _safepoint_counter; } |
161 inline static int safepoint_counter() { return _safepoint_counter; } |
162 |
162 |
163 inline static bool do_call_back() { |
|
164 return (_state != _not_synchronized); |
|
165 } |
|
166 |
|
167 inline static void increment_jni_active_count() { |
163 inline static void increment_jni_active_count() { |
168 assert_locked_or_safepoint(Safepoint_lock); |
164 assert_locked_or_safepoint(Safepoint_lock); |
169 _current_jni_active_count++; |
165 _current_jni_active_count++; |
170 } |
166 } |
171 |
167 |
|
168 private: |
|
169 inline static bool do_call_back() { |
|
170 return (_state != _not_synchronized); |
|
171 } |
|
172 |
172 // Called when a thread voluntarily blocks |
173 // Called when a thread voluntarily blocks |
173 static void block(JavaThread *thread); |
174 static void block(JavaThread *thread); |
|
175 |
|
176 friend class SafepointMechanism; |
|
177 |
|
178 public: |
174 static void signal_thread_at_safepoint() { _waiting_to_block--; } |
179 static void signal_thread_at_safepoint() { _waiting_to_block--; } |
175 |
180 |
176 // Exception handling for page polling |
181 // Exception handling for page polling |
177 static void handle_polling_page_exception(JavaThread *thread); |
182 static void handle_polling_page_exception(JavaThread *thread); |
178 |
183 |