aboutsummaryrefslogtreecommitdiff
path: root/src/os/linux
diff options
context:
space:
mode:
authorphh <none@none>2012-01-26 20:06:06 -0500
committerphh <none@none>2012-01-26 20:06:06 -0500
commit3e717add9a2fbddc89ee47a712d3b9d2705a954a (patch)
tree65b016072cb0c2d215d0741a7562aea5603586f1 /src/os/linux
parentee4b0014ea166c1aefe48501efb2deeb8aada37a (diff)
7082553: Interpret Thread.setPriority(Thread.MAX_PRIORITY) to mean FX60 on Solaris 10 and 11
Summary: Add CriticalPriority == MaxPriority+1 and enable scheduling class as well as thread priority to change on Solaris. Reviewed-by: dholmes, dcubed
Diffstat (limited to 'src/os/linux')
-rw-r--r--src/os/linux/vm/os_linux.cpp11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/os/linux/vm/os_linux.cpp b/src/os/linux/vm/os_linux.cpp
index f2e198813..72f3fd07a 100644
--- a/src/os/linux/vm/os_linux.cpp
+++ b/src/os/linux/vm/os_linux.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1999, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2012, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -3383,7 +3383,7 @@ void os::loop_breaker(int attempts) {
// this reason, the code should not be used as default (ThreadPriorityPolicy=0).
// It is only used when ThreadPriorityPolicy=1 and requires root privilege.
-int os::java_to_os_priority[MaxPriority + 1] = {
+int os::java_to_os_priority[CriticalPriority + 1] = {
19, // 0 Entry should never be used
4, // 1 MinPriority
@@ -3398,7 +3398,9 @@ int os::java_to_os_priority[MaxPriority + 1] = {
-3, // 8
-4, // 9 NearMaxPriority
- -5 // 10 MaxPriority
+ -5, // 10 MaxPriority
+
+ -5 // 11 CriticalPriority
};
static int prio_init() {
@@ -3413,6 +3415,9 @@ static int prio_init() {
ThreadPriorityPolicy = 0;
}
}
+ if (UseCriticalJavaThreadPriority) {
+ os::java_to_os_priority[MaxPriority] = os::java_to_os_priority[CriticalPriority];
+ }
return 0;
}