Path: blob/aarch64-shenandoah-jdk8u272-b10/hotspot/src/os/bsd/vm/jvm_bsd.h
32285 views
/*1* Copyright (c) 1999, 2010, 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_BSD_VM_JVM_BSD_H25#define OS_BSD_VM_JVM_BSD_H2627/*28// HotSpot integration note:29//30// This is derived from the JDK classic file:31// "$JDK/src/solaris/javavm/export/jvm_md.h":15 (ver. 1.10 98/04/22)32// All local includes have been commented out.33*/3435#ifndef JVM_MD_H36#define JVM_MD_H3738/*39* This file is currently collecting system-specific dregs for the40* JNI conversion, which should be sorted out later.41*/42#ifdef __NetBSD__43/*44* Since we are compiling with c++, we need the following to make c macros45* visible.46*/47# if !defined(__STDC_LIMIT_MACROS)48# define __STDC_LIMIT_MACROS 149# endif50# if !defined(__STDC_CONSTANT_MACROS)51# define __STDC_CONSTANT_MACROS 152# endif53# if !defined(__STDC_FORMAT_MACROS)54# define __STDC_FORMAT_MACROS 155# endif56#endif5758#include <dirent.h> /* For DIR */59#include <sys/param.h> /* For MAXPATHLEN */60#include <sys/socket.h> /* For socklen_t */61#include <unistd.h> /* For F_OK, R_OK, W_OK */6263#define JNI_ONLOAD_SYMBOLS {"JNI_OnLoad"}64#define JNI_ONUNLOAD_SYMBOLS {"JNI_OnUnload"}65#define JVM_ONLOAD_SYMBOLS {"JVM_OnLoad"}66#define AGENT_ONLOAD_SYMBOLS {"Agent_OnLoad"}67#define AGENT_ONUNLOAD_SYMBOLS {"Agent_OnUnload"}68#define AGENT_ONATTACH_SYMBOLS {"Agent_OnAttach"}6970#define JNI_LIB_PREFIX "lib"71#ifdef __APPLE__72#define JNI_LIB_SUFFIX ".dylib"73#else74#define JNI_LIB_SUFFIX ".so"75#endif7677// Hack: MAXPATHLEN is 4095 on some Bsd and 4096 on others. This may78// cause problems if JVM and the rest of JDK are built on different79// Bsd releases. Here we define JVM_MAXPATHLEN to be MAXPATHLEN + 1,80// so buffers declared in VM are always >= 4096.81#define JVM_MAXPATHLEN MAXPATHLEN + 18283#define JVM_R_OK R_OK84#define JVM_W_OK W_OK85#define JVM_X_OK X_OK86#define JVM_F_OK F_OK8788/*89* File I/O90*/9192#include <sys/types.h>93#include <sys/stat.h>94#include <fcntl.h>95#include <errno.h>9697/* O Flags */9899#define JVM_O_RDONLY O_RDONLY100#define JVM_O_WRONLY O_WRONLY101#define JVM_O_RDWR O_RDWR102#define JVM_O_O_APPEND O_APPEND103#define JVM_O_EXCL O_EXCL104#define JVM_O_CREAT O_CREAT105106/* Signal definitions */107108#define BREAK_SIGNAL SIGQUIT /* Thread dumping support. */109#define INTERRUPT_SIGNAL SIGUSR1 /* Interruptible I/O support. */110#define SHUTDOWN1_SIGNAL SIGHUP /* Shutdown Hooks support. */111#define SHUTDOWN2_SIGNAL SIGINT112#define SHUTDOWN3_SIGNAL SIGTERM113114#ifndef SIGRTMIN115#ifdef __OpenBSD__116#define SIGRTMIN 1117#else118#define SIGRTMIN 33119#endif120#endif121#ifndef SIGRTMAX122#ifdef __OpenBSD__123#define SIGRTMAX 31124#else125#define SIGRTMAX 63126#endif127#endif128#endif /* JVM_MD_H */129130#endif // OS_BSD_VM_JVM_BSD_H131132133