|
| 1 | +/* |
| 2 | + * =========================================================================== |
| 3 | + * (c) Copyright IBM Corp. 2025, 2025 All Rights Reserved |
| 4 | + * =========================================================================== |
| 5 | + * |
| 6 | + * This code is free software; you can redistribute it and/or modify it |
| 7 | + * under the terms of the GNU General Public License version 2 only, as |
| 8 | + * published by the Free Software Foundation. |
| 9 | + * |
| 10 | + * IBM designates this particular file as subject to the "Classpath" exception |
| 11 | + * as provided by IBM in the LICENSE file that accompanied this code. |
| 12 | + * |
| 13 | + * This code is distributed in the hope that it will be useful, but WITHOUT |
| 14 | + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
| 15 | + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
| 16 | + * version 2 for more details (a copy is included in the LICENSE file that |
| 17 | + * accompanied this code). |
| 18 | + * |
| 19 | + * You should have received a copy of the GNU General Public License version |
| 20 | + * 2 along with this work; if not, see <http://www.gnu.org/licenses/>. |
| 21 | + * |
| 22 | + * =========================================================================== |
| 23 | + */ |
| 24 | + |
| 25 | +#include "jni.h" |
| 26 | +#include "jvm.h" |
| 27 | + |
| 28 | +/* These definitions required by j9.h are in the OpenJ9 jni.h, but OpenJDK jni.h is used here. */ |
| 29 | +struct GCStatus; |
| 30 | +typedef struct GCStatus GCStatus; |
| 31 | +struct JavaVMQuery; |
| 32 | +typedef struct JavaVMQuery JavaVMQuery; |
| 33 | +struct JVMExtensionInterface_; |
| 34 | +typedef const struct JVMExtensionInterface_ *JVMExt; |
| 35 | + |
| 36 | +#define COPY_PROGRESS_INFO_MASK 0 |
| 37 | +#if defined(AIX) |
| 38 | +#define AIXPPC |
| 39 | +#define RS6000 |
| 40 | +#endif /* defined(AIX) */ |
| 41 | +#if defined(MACOSX) |
| 42 | +#define OSX |
| 43 | +#endif /* defined(MACOSX) */ |
| 44 | +#if defined(WIN32) |
| 45 | +#define OMR_OS_WINDOWS |
| 46 | +#endif /* defined(WIN32) */ |
| 47 | + |
| 48 | +#include "j9.h" |
| 49 | +#include "tracehelp.c" |
| 50 | +#include "ut_jcl_nio.c" |
| 51 | + |
| 52 | +JNIEXPORT jint JNICALL |
| 53 | +JNI_OnLoad(JavaVM *vm, void *reserved) |
| 54 | +{ |
| 55 | + UT_JCL_NIO_MODULE_LOADED(J9_UTINTERFACE_FROM_VM((J9JavaVM *)vm)); |
| 56 | + |
| 57 | + return JNI_VERSION_1_2; |
| 58 | +} |
0 commit comments