/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*
*/
// This is embedded via include into the class OSThread
public:
private:
// a bound thread
// false if primary thread or attached thread
public:
// Set and get state of _vm_created_thread flag
#ifndef PRODUCT
// Used for debugging, return a unique integer for each thread.
#endif
#ifdef ASSERT
// On solaris reposition can fail in two ways:
// 1: a mismatched pc, because signal is delivered too late, target thread
// is resumed.
// 2: on a timeout where signal is lost, target thread is resumed.
bool valid_reposition_failure() {
// only 1 and 2 can happen and we can handle both of them
return true;
}
#endif
// ***************************************************************
// interrupt support. interrupts (using signals) are used to get
// the thread context (get_thread_pc), to set the thread context
// (set_thread_pc), and to implement java.lang.Thread.interrupt.
// ***************************************************************
public:
private:
public:
// ***************************************************************
// java.lang.Thread.interrupt state.
// ***************************************************************
private:
JavaThreadState _saved_interrupt_thread_state; // the thread state before a system call -- restored afterward
public:
void set_saved_interrupt_thread_state(JavaThreadState state) { _saved_interrupt_thread_state = state; }
// ***************************************************************
// Platform dependent initialization and cleanup
// ***************************************************************
private:
void pd_initialize();
void pd_destroy();
#endif // OS_SOLARIS_VM_OSTHREAD_SOLARIS_HPP