7082553: Interpret Thread.setPriority(Thread.MAX_PRIORITY) to mean FX60 on Solaris 10 and 11

Add CriticalPriority == MaxPriority+1 and enable scheduling class as well as thread priority to change on Solaris.

Reviewed-by: dholmes, dcubed
This commit is contained in:
Paul Hohensee 2012-01-26 20:06:06 -05:00
parent 7ece654913
commit 09e21afaaa
9 changed files with 289 additions and 140 deletions

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 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
@ -28,17 +28,17 @@
// This is embedded via include into the class OSThread
private:
thread_t _thread_id; // Solaris thread id
unsigned int _lwp_id; // lwp ID, only used with bound threads
sigset_t _caller_sigmask; // Caller's signal mask
bool _vm_created_thread; // true if the VM create this thread
// false if primary thread or attached thread
thread_t _thread_id; // Solaris thread id
uint _lwp_id; // lwp ID, only used with bound threads
int _native_priority; // Saved native priority when starting
// a bound thread
sigset_t _caller_sigmask; // Caller's signal mask
bool _vm_created_thread; // true if the VM created this thread,
// false if primary thread or attached thread
public:
thread_t thread_id() const { return _thread_id; }
unsigned int lwp_id() const { return _lwp_id; }
thread_t thread_id() const { return _thread_id; }
uint lwp_id() const { return _lwp_id; }
int native_priority() const { return _native_priority; }
// Set and get state of _vm_created_thread flag
void set_vm_created() { _vm_created_thread = true; }
@ -62,8 +62,9 @@
return true;
}
#endif
void set_thread_id(thread_t id) { _thread_id = id; }
void set_lwp_id(unsigned int id){ _lwp_id = id; }
void set_thread_id(thread_t id) { _thread_id = id; }
void set_lwp_id(uint id) { _lwp_id = id; }
void set_native_priority(int prio) { _native_priority = prio; }
// ***************************************************************
// interrupt support. interrupts (using signals) are used to get