Path: blob/aarch64-shenandoah-jdk8u272-b10/hotspot/src/os/windows/vm/osThread_windows.hpp
32284 views
/*1* Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.2* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.3*4* This code is free software; you can redistribute it and/or modify it5* under the terms of the GNU General Public License version 2 only, as6* published by the Free Software Foundation.7*8* This code is distributed in the hope that it will be useful, but WITHOUT9* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or10* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License11* version 2 for more details (a copy is included in the LICENSE file that12* accompanied this code).13*14* You should have received a copy of the GNU General Public License version15* 2 along with this work; if not, write to the Free Software Foundation,16* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.17*18* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA19* or visit www.oracle.com if you need additional information or have any20* questions.21*22*/2324#ifndef OS_WINDOWS_VM_OSTHREAD_WINDOWS_HPP25#define OS_WINDOWS_VM_OSTHREAD_WINDOWS_HPP2627typedef void* HANDLE;28public:29typedef unsigned long thread_id_t;3031private:32// Win32-specific thread information33HANDLE _thread_handle; // Win32 thread handle34HANDLE _interrupt_event; // Event signalled on thread interrupt35ThreadState _last_state;3637public:38// The following will only apply in the Win32 implementation, and should only39// be visible in the concrete class, not this which should be an abstract base class40HANDLE thread_handle() const { return _thread_handle; }41void set_thread_handle(HANDLE handle) { _thread_handle = handle; }42HANDLE interrupt_event() const { return _interrupt_event; }43void set_interrupt_event(HANDLE interrupt_event) { _interrupt_event = interrupt_event; }4445#ifndef PRODUCT46// Used for debugging, return a unique integer for each thread.47int thread_identifier() const { return _thread_id; }48#endif49#ifdef ASSERT50// We expect no reposition failures so kill vm if we get one51//52bool valid_reposition_failure() {53return false;54}55#endif // ASSERT56bool is_try_mutex_enter() { return false; }5758// This is a temporary fix for the thread states during59// suspend/resume until we throw away OSThread completely.60// NEEDS_CLEANUP61void set_last_state(ThreadState state) { _last_state = state; }62ThreadState get_last_state() { return _last_state; }6364private:65void pd_initialize();66void pd_destroy();6768#endif // OS_WINDOWS_VM_OSTHREAD_WINDOWS_HPP697071