equal
deleted
inserted
replaced
2988 if (millis == 0) { |
2988 if (millis == 0) { |
2989 os::naked_yield(); |
2989 os::naked_yield(); |
2990 } else { |
2990 } else { |
2991 ThreadState old_state = thread->osthread()->get_state(); |
2991 ThreadState old_state = thread->osthread()->get_state(); |
2992 thread->osthread()->set_state(SLEEPING); |
2992 thread->osthread()->set_state(SLEEPING); |
2993 if (os::sleep(thread, millis) == OS_INTRPT) { |
2993 if (!thread->sleep(millis)) { // interrupted |
2994 // An asynchronous exception (e.g., ThreadDeathException) could have been thrown on |
2994 // An asynchronous exception (e.g., ThreadDeathException) could have been thrown on |
2995 // us while we were sleeping. We do not overwrite those. |
2995 // us while we were sleeping. We do not overwrite those. |
2996 if (!HAS_PENDING_EXCEPTION) { |
2996 if (!HAS_PENDING_EXCEPTION) { |
2997 if (event.should_commit()) { |
2997 if (event.should_commit()) { |
2998 post_thread_sleep_event(&event, millis); |
2998 post_thread_sleep_event(&event, millis); |