mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-24 04:54:40 +02:00
8047714: Fix for JDK-6546236 made Solaris os::yield() a no-op
Reviewed-by: hseigel, lfoltan
This commit is contained in:
parent
4f7e4160a0
commit
5a8cc5f33d
15 changed files with 23 additions and 47 deletions
|
@ -442,16 +442,7 @@ class os: AllStatic {
|
|||
// ms = 0, will sleep for the least amount of time allowed by the OS.
|
||||
static void naked_short_sleep(jlong ms);
|
||||
static void infinite_sleep(); // never returns, use with CAUTION
|
||||
static void yield(); // Yields to all threads with same priority
|
||||
enum YieldResult {
|
||||
YIELD_SWITCHED = 1, // caller descheduled, other ready threads exist & ran
|
||||
YIELD_NONEREADY = 0, // No other runnable/ready threads.
|
||||
// platform-specific yield return immediately
|
||||
YIELD_UNKNOWN = -1 // Unknown: platform doesn't support _SWITCHED or _NONEREADY
|
||||
// YIELD_SWITCHED and YIELD_NONREADY imply the platform supports a "strong"
|
||||
// yield that can be used in lieu of blocking.
|
||||
} ;
|
||||
static YieldResult NakedYield () ;
|
||||
static void naked_yield () ;
|
||||
static OSReturn set_priority(Thread* thread, ThreadPriority priority);
|
||||
static OSReturn get_priority(const Thread* const thread, ThreadPriority& priority);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue