Mercurial > hg > graal-compiler
comparison src/share/vm/runtime/os.hpp @ 4854:de268c8a8075
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
author | phh |
---|---|
date | Thu, 26 Jan 2012 20:06:06 -0500 |
parents | 2b3acb34791f |
children | 897b7d18bebc da4be62fb889 |
comparison
equal
deleted
inserted
replaced
4853:6db63e782d3d | 4854:de268c8a8075 |
---|---|
1 /* | 1 /* |
2 * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. | 2 * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. | 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * | 4 * |
5 * This code is free software; you can redistribute it and/or modify it | 5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as | 6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. | 7 * published by the Free Software Foundation. |
71 enum ThreadPriority { // JLS 20.20.1-3 | 71 enum ThreadPriority { // JLS 20.20.1-3 |
72 NoPriority = -1, // Initial non-priority value | 72 NoPriority = -1, // Initial non-priority value |
73 MinPriority = 1, // Minimum priority | 73 MinPriority = 1, // Minimum priority |
74 NormPriority = 5, // Normal (non-daemon) priority | 74 NormPriority = 5, // Normal (non-daemon) priority |
75 NearMaxPriority = 9, // High priority, used for VMThread | 75 NearMaxPriority = 9, // High priority, used for VMThread |
76 MaxPriority = 10 // Highest priority, used for WatcherThread | 76 MaxPriority = 10, // Highest priority, used for WatcherThread |
77 // ensures that VMThread doesn't starve profiler | 77 // ensures that VMThread doesn't starve profiler |
78 CriticalPriority = 11 // Critical thread priority | |
78 }; | 79 }; |
79 | 80 |
80 // Typedef for structured exception handling support | 81 // Typedef for structured exception handling support |
81 typedef void (*java_call_t)(JavaValue* value, methodHandle* method, JavaCallArguments* args, Thread* thread); | 82 typedef void (*java_call_t)(JavaValue* value, methodHandle* method, JavaCallArguments* args, Thread* thread); |
82 | 83 |
731 static void print_statistics(); | 732 static void print_statistics(); |
732 | 733 |
733 // Thread priority helpers (implemented in OS-specific part) | 734 // Thread priority helpers (implemented in OS-specific part) |
734 static OSReturn set_native_priority(Thread* thread, int native_prio); | 735 static OSReturn set_native_priority(Thread* thread, int native_prio); |
735 static OSReturn get_native_priority(const Thread* const thread, int* priority_ptr); | 736 static OSReturn get_native_priority(const Thread* const thread, int* priority_ptr); |
736 static int java_to_os_priority[MaxPriority + 1]; | 737 static int java_to_os_priority[CriticalPriority + 1]; |
737 // Hint to the underlying OS that a task switch would not be good. | 738 // Hint to the underlying OS that a task switch would not be good. |
738 // Void return because it's a hint and can fail. | 739 // Void return because it's a hint and can fail. |
739 static void hint_no_preempt(); | 740 static void hint_no_preempt(); |
740 | 741 |
741 // Used at creation if requested by the diagnostic flag PauseAtStartup. | 742 // Used at creation if requested by the diagnostic flag PauseAtStartup. |