Path: blob/master/runtime/j9vm/j9vm_internal.h
5985 views
/*******************************************************************************1* Copyright (c) 2002, 2018 IBM Corp. and others2*3* This program and the accompanying materials are made available under4* the terms of the Eclipse Public License 2.0 which accompanies this5* distribution and is available at https://www.eclipse.org/legal/epl-2.0/6* or the Apache License, Version 2.0 which accompanies this distribution and7* is available at https://www.apache.org/licenses/LICENSE-2.0.8*9* This Source Code may also be made available under the following10* Secondary Licenses when the conditions for such availability set11* forth in the Eclipse Public License, v. 2.0 are satisfied: GNU12* General Public License, version 2 with the GNU Classpath13* Exception [1] and GNU General Public License, version 2 with the14* OpenJDK Assembly Exception [2].15*16* [1] https://www.gnu.org/software/classpath/license.html17* [2] http://openjdk.java.net/legal/assembly-exception.html18*19* SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 OR LicenseRef-GPL-2.0 WITH Assembly-exception20*******************************************************************************/2122#ifndef j9vm_internal_h23#define j9vm_internal_h242526#ifdef WIN3227#include <tchar.h>28#include <io.h>29#if !defined(O_SYNC)30#define O_SYNC 0x080031#endif32#if !defined(O_DSYNC)33#define O_DSYNC 0x200034#endif35#define JVM_DEFAULT_ERROR_BUFFER_SIZE 25636#endif /* WIN32 */3738#if defined(LINUX)39#if !defined(_GNU_SOURCE)40/* defining _GNU_SOURCE allows the use of dladdr() in dlfcn.h */41#define _GNU_SOURCE42#endif /* !defined(_GNU_SOURCE) */43#include <dlfcn.h>44#endif4546/* We need to do this to get the system includes to give xlC what it only wants to give GCC but not give xlC the things which it doesn't understand */47#if defined(LINUXPPC)48#include <features.h>49#undef __USE_GNU50#include <sys/socket.h>51#define __USE_GNU 152#endif5354/* Avoid renaming malloc/free */55#define LAUNCHERS56#include "jvm.h"5758#if defined(J9UNIX)59#include <sys/socket.h>60#include <dlfcn.h>61#include <sys/ioctl.h>62#include <setjmp.h>63#include <sys/time.h>6465/* On OSX, fstat64 is deprecated. So, fstat is used on OSX. */66#if defined(J9ZTPF) || defined(OSX)67#define J9FSTAT fstat68#else /* defined(J9ZTPF) || defined(OSX) */69#define J9FSTAT fstat6470#endif /* defined(J9ZTPF) || defined(OSX) */71#endif /* defined(J9UNIX) */727374/* required for poll support on some Unix platforms (called in JVM_Available) */75#if defined(LINUX) || defined(OSX) || defined(AIXPPC) || defined(J9ZOS390)76#include <sys/types.h>77#include <sys/stat.h>78#include <fcntl.h>79#if defined(LINUX) || defined(OSX)80#include <poll.h>81#elif defined(AIXPPC)82#include <sys/poll.h>83#elif defined(J9ZOS390)84#include <poll.h>85#else86#error No poll.h location on this platform87#endif88#endif8990#ifdef RS600091#include <sys/ldr.h>92#include <load.h>93#endif9495#if defined(J9ZOS390)96#include <assert.h>97#include <sys/time.h>98#include <sys/socket.h>99#include <dll.h>100#include <sys/ioctl.h>101#include "atoe.h"102#include <unistd.h>103#define dlsym dllqueryfn104#define dlopen(a,b) dllload(a)105#define dlclose dllfree106#define J9FSTAT fstat107#endif108109#include "omrthread.h"110111/**112* Initializes the VM-interface from the supplied JNIEnv.113*/114void initializeVMI(void);115116jclass117jvmDefineClassHelper(JNIEnv *env, jobject classLoaderObject,118jstring className, jbyte * classBytes, jint offset, jint length, jobject protectionDomain, UDATA options);119120#endif /* j9vm_internal_h */121122123