src/hotspot/share/prims/jvm.cpp
changeset 58041 d8902e9c307c
parent 57751 7284b00e6db3
child 58043 647d623650d3
equal deleted inserted replaced
58040:d99af76d7689 58041:d8902e9c307c
  2976   if (millis == 0) {
  2976   if (millis == 0) {
  2977     os::naked_yield();
  2977     os::naked_yield();
  2978   } else {
  2978   } else {
  2979     ThreadState old_state = thread->osthread()->get_state();
  2979     ThreadState old_state = thread->osthread()->get_state();
  2980     thread->osthread()->set_state(SLEEPING);
  2980     thread->osthread()->set_state(SLEEPING);
  2981     if (os::sleep(thread, millis, true) == OS_INTRPT) {
  2981     if (os::sleep(thread, millis) == OS_INTRPT) {
  2982       // An asynchronous exception (e.g., ThreadDeathException) could have been thrown on
  2982       // An asynchronous exception (e.g., ThreadDeathException) could have been thrown on
  2983       // us while we were sleeping. We do not overwrite those.
  2983       // us while we were sleeping. We do not overwrite those.
  2984       if (!HAS_PENDING_EXCEPTION) {
  2984       if (!HAS_PENDING_EXCEPTION) {
  2985         if (event.should_commit()) {
  2985         if (event.should_commit()) {
  2986           post_thread_sleep_event(&event, millis);
  2986           post_thread_sleep_event(&event, millis);