equal
deleted
inserted
replaced
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); |