Path: blob/aarch64-shenandoah-jdk8u272-b10/hotspot/src/os/windows/vm/jvm_windows.h
32284 views
/*1* Copyright (c) 1998, 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_JVM_WINDOWS_H25#define OS_WINDOWS_VM_JVM_WINDOWS_H2627#ifndef _JAVASOFT_JVM_MD_H_28#define _JAVASOFT_JVM_MD_H_2930/*31* This file is currently collecting system-specific dregs for the32* JNI conversion, which should be sorted out later.33*/3435// JDK7 requires VS201036#if _MSC_VER >= 160037// JDK7 minimum platform requirement: Windows XP38#if _WIN32_WINNT < 0x050139#undef _WIN32_WINNT40#define _WIN32_WINNT 0x050141#endif42#endif4344#include <windows.h>4546#if _MSC_VER <= 120047// Psapi.h doesn't come with Visual Studio 6; it can be downloaded as Platform48// SDK from Microsoft. Here are the definitions copied from Psapi.h49typedef struct _MODULEINFO {50LPVOID lpBaseOfDll;51DWORD SizeOfImage;52LPVOID EntryPoint;53} MODULEINFO, *LPMODULEINFO;5455#else56#include <Psapi.h>57#endif5859#include <Tlhelp32.h>6061typedef int socklen_t;6263#define JNI_ONLOAD_SYMBOLS {"_JNI_OnLoad@8", "JNI_OnLoad"}64#define JNI_ONUNLOAD_SYMBOLS {"_JNI_OnUnload@8", "JNI_OnUnload"}65#define JVM_ONLOAD_SYMBOLS {"_JVM_OnLoad@12", "JVM_OnLoad"}66#define AGENT_ONLOAD_SYMBOLS {"_Agent_OnLoad@12", "Agent_OnLoad"}67#define AGENT_ONUNLOAD_SYMBOLS {"_Agent_OnUnload@4", "Agent_OnUnload"}68#define AGENT_ONATTACH_SYMBOLS {"_Agent_OnAttach@12", "Agent_OnAttach"}6970#define JNI_LIB_PREFIX ""71#define JNI_LIB_SUFFIX ".dll"7273struct dirent {74char d_name[MAX_PATH];75};7677typedef struct {78struct dirent dirent;79char *path;80HANDLE handle;81WIN32_FIND_DATA find_data;82} DIR;8384#include <stdlib.h>8586#define JVM_MAXPATHLEN _MAX_PATH8788#define JVM_R_OK 489#define JVM_W_OK 290#define JVM_X_OK 191#define JVM_F_OK 09293#ifdef __cplusplus94extern "C" {95#endif9697JNIEXPORT void * JNICALL98JVM_GetThreadInterruptEvent();99100#ifdef __cplusplus101} /* extern "C" */102#endif /* __cplusplus */103104/*105* File I/O106*/107108#include <sys/stat.h>109110/* O Flags */111112#define JVM_O_RDONLY O_RDONLY113#define JVM_O_WRONLY O_WRONLY114#define JVM_O_RDWR O_RDWR115#define JVM_O_O_APPEND O_APPEND116#define JVM_O_EXCL O_EXCL117#define JVM_O_CREAT O_CREAT118#define JVM_O_DELETE O_TEMPORARY119120/* Signals */121122#define JVM_SIGINT SIGINT123#define JVM_SIGTERM SIGTERM124125#define SHUTDOWN1_SIGNAL SIGINT /* Shutdown Hooks support. */126#define SHUTDOWN2_SIGNAL SIGTERM127128#endif /* !_JAVASOFT_JVM_MD_H_ */129130#endif // OS_WINDOWS_VM_JVM_WINDOWS_H131132133