There are a couple of cleanups that need to be done:
- Move _suspend_flags and asynchronous exception related fields from class Thread to JavaThread
- Rename _special_runtime_exit_condition to _async_exception_condition and related methods. This name has been mixed up with the suspend flags which are checked together in has_special_runtime_exit_condition() and handle_special_runtime_exit_condition().
- Decouple _suspend_flags from asynchronous exception as much as possible by removing methods has_async_exception(), set_has_async_exception() and clear_has_async_exception() associated with _suspend_flags since they create confusion as to who actually manages asynchronous exceptions.