src/os/aix/vm/jvm_aix.h

Wed, 31 Jan 2018 19:24:57 -0500

author
dbuck
date
Wed, 31 Jan 2018 19:24:57 -0500
changeset 9289
427b2fb1944f
parent 0
f90c822e73f8
permissions
-rw-r--r--

8189170: Add option to disable stack overflow checking in primordial thread for use with JNI_CreateJavaJVM
Reviewed-by: dcubed

aoqi@0 1 /*
aoqi@0 2 * Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved.
aoqi@0 3 * Copyright 2012, 2013 SAP AG. All rights reserved.
aoqi@0 4 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
aoqi@0 5 *
aoqi@0 6 * This code is free software; you can redistribute it and/or modify it
aoqi@0 7 * under the terms of the GNU General Public License version 2 only, as
aoqi@0 8 * published by the Free Software Foundation.
aoqi@0 9 *
aoqi@0 10 * This code is distributed in the hope that it will be useful, but WITHOUT
aoqi@0 11 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
aoqi@0 12 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
aoqi@0 13 * version 2 for more details (a copy is included in the LICENSE file that
aoqi@0 14 * accompanied this code).
aoqi@0 15 *
aoqi@0 16 * You should have received a copy of the GNU General Public License version
aoqi@0 17 * 2 along with this work; if not, write to the Free Software Foundation,
aoqi@0 18 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
aoqi@0 19 *
aoqi@0 20 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
aoqi@0 21 * or visit www.oracle.com if you need additional information or have any
aoqi@0 22 * questions.
aoqi@0 23 *
aoqi@0 24 */
aoqi@0 25
aoqi@0 26 #ifndef OS_AIX_VM_JVM_AIX_H
aoqi@0 27 #define OS_AIX_VM_JVM_AIX_H
aoqi@0 28
aoqi@0 29 // HotSpot integration note:
aoqi@0 30 //
aoqi@0 31 // This is derived from the JDK classic file:
aoqi@0 32 // "$JDK/src/solaris/javavm/export/jvm_md.h":15 (ver. 1.10 98/04/22)
aoqi@0 33 // All local includes have been commented out.
aoqi@0 34
aoqi@0 35 #ifndef JVM_MD_H
aoqi@0 36 #define JVM_MD_H
aoqi@0 37
aoqi@0 38 /*
aoqi@0 39 * This file is currently collecting system-specific dregs for the
aoqi@0 40 * JNI conversion, which should be sorted out later.
aoqi@0 41 */
aoqi@0 42
aoqi@0 43 // Since we are compiling with c++, we need the following to make c macros
aoqi@0 44 // visible.
aoqi@0 45 #if !defined(__STDC_LIMIT_MACROS)
aoqi@0 46 # define __STDC_LIMIT_MACROS 1
aoqi@0 47 #endif
aoqi@0 48 #if !defined(__STDC_CONSTANT_MACROS)
aoqi@0 49 # define __STDC_CONSTANT_MACROS 1
aoqi@0 50 #endif
aoqi@0 51 #if !defined(__STDC_FORMAT_MACROS)
aoqi@0 52 # define __STDC_FORMAT_MACROS 1
aoqi@0 53 #endif
aoqi@0 54
aoqi@0 55 #include <dirent.h> /* For DIR */
aoqi@0 56
aoqi@0 57 // Must redefine NULL because the macro gets redefined to int 0
aoqi@0 58 // by dirent.h. This redefinition is included later then the standard definition in
aoqi@0 59 // globalDefinitions_<compiler>.hpp and leads to assertions in the VM initialization.
aoqi@0 60 // We definitely need NULL to have the same lengh as an address pointer.
aoqi@0 61 #ifdef _LP64
aoqi@0 62 #undef NULL
aoqi@0 63 #define NULL 0L
aoqi@0 64 #else
aoqi@0 65 #ifndef NULL
aoqi@0 66 #define NULL 0
aoqi@0 67 #endif
aoqi@0 68 #endif
aoqi@0 69
aoqi@0 70 #include <sys/param.h> /* For MAXPATHLEN */
aoqi@0 71 #include <sys/socket.h> /* For socklen_t */
aoqi@0 72 #include <unistd.h> /* For F_OK, R_OK, W_OK */
aoqi@0 73
aoqi@0 74 #define JNI_ONLOAD_SYMBOLS {"JNI_OnLoad"}
aoqi@0 75 #define JNI_ONUNLOAD_SYMBOLS {"JNI_OnUnload"}
aoqi@0 76 #define JVM_ONLOAD_SYMBOLS {"JVM_OnLoad"}
aoqi@0 77 #define AGENT_ONLOAD_SYMBOLS {"Agent_OnLoad"}
aoqi@0 78 #define AGENT_ONUNLOAD_SYMBOLS {"Agent_OnUnload"}
aoqi@0 79 #define AGENT_ONATTACH_SYMBOLS {"Agent_OnAttach"}
aoqi@0 80
aoqi@0 81 #define JNI_LIB_PREFIX "lib"
aoqi@0 82 #define JNI_LIB_SUFFIX ".so"
aoqi@0 83
aoqi@0 84 // Hack: MAXPATHLEN is 4095 on some Linux and 4096 on others. This may
aoqi@0 85 // cause problems if JVM and the rest of JDK are built on different
aoqi@0 86 // Linux releases. Here we define JVM_MAXPATHLEN to be MAXPATHLEN + 1,
aoqi@0 87 // so buffers declared in VM are always >= 4096.
aoqi@0 88 #define JVM_MAXPATHLEN MAXPATHLEN + 1
aoqi@0 89
aoqi@0 90 #define JVM_R_OK R_OK
aoqi@0 91 #define JVM_W_OK W_OK
aoqi@0 92 #define JVM_X_OK X_OK
aoqi@0 93 #define JVM_F_OK F_OK
aoqi@0 94
aoqi@0 95 /*
aoqi@0 96 * File I/O
aoqi@0 97 */
aoqi@0 98
aoqi@0 99 #include <sys/types.h>
aoqi@0 100 #include <sys/stat.h>
aoqi@0 101 #include <fcntl.h>
aoqi@0 102 #include <errno.h>
aoqi@0 103
aoqi@0 104 /* O Flags */
aoqi@0 105
aoqi@0 106 #define JVM_O_RDONLY O_RDONLY
aoqi@0 107 #define JVM_O_WRONLY O_WRONLY
aoqi@0 108 #define JVM_O_RDWR O_RDWR
aoqi@0 109 #define JVM_O_O_APPEND O_APPEND
aoqi@0 110 #define JVM_O_EXCL O_EXCL
aoqi@0 111 #define JVM_O_CREAT O_CREAT
aoqi@0 112
aoqi@0 113 /* Signal definitions */
aoqi@0 114
aoqi@0 115 #define BREAK_SIGNAL SIGQUIT /* Thread dumping support. */
aoqi@0 116 #define INTERRUPT_SIGNAL SIGUSR1 /* Interruptible I/O support. */
aoqi@0 117 #define SHUTDOWN1_SIGNAL SIGHUP /* Shutdown Hooks support. */
aoqi@0 118 #define SHUTDOWN2_SIGNAL SIGINT
aoqi@0 119 #define SHUTDOWN3_SIGNAL SIGTERM
aoqi@0 120
aoqi@0 121 #endif /* JVM_MD_H */
aoqi@0 122
aoqi@0 123 #endif // OS_AIX_VM_JVM_AIX_H

mercurial