mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-21 03:24:38 +02:00
7103224: collision between __LEAF define in interfaceSupport.hpp and /usr/include/sys/cdefs.h with gcc
Reviewed-by: never
This commit is contained in:
parent
3336939f08
commit
160ad3376d
6 changed files with 25 additions and 27 deletions
|
@ -34,8 +34,6 @@
|
||||||
|
|
||||||
// Portions of code courtesy of Clifford Click
|
// Portions of code courtesy of Clifford Click
|
||||||
|
|
||||||
#define MAXFLOAT ((float)3.40282346638528860e+38)
|
|
||||||
|
|
||||||
// Classic Add functionality. This covers all the usual 'add' behaviors for
|
// Classic Add functionality. This covers all the usual 'add' behaviors for
|
||||||
// an algebraic ring. Add-integer, add-float, add-double, and binary-or are
|
// an algebraic ring. Add-integer, add-float, add-double, and binary-or are
|
||||||
// all inherited from this class. The various identity values are supplied
|
// all inherited from this class. The various identity values are supplied
|
||||||
|
|
|
@ -107,7 +107,7 @@ extern "C" { \
|
||||||
if (env != xenv) { \
|
if (env != xenv) { \
|
||||||
NativeReportJNIFatalError(thr, warn_wrong_jnienv); \
|
NativeReportJNIFatalError(thr, warn_wrong_jnienv); \
|
||||||
} \
|
} \
|
||||||
__ENTRY(result_type, header, thr)
|
VM_ENTRY_BASE(result_type, header, thr)
|
||||||
|
|
||||||
|
|
||||||
#define UNCHECKED() (unchecked_jni_NativeInterface)
|
#define UNCHECKED() (unchecked_jni_NativeInterface)
|
||||||
|
|
|
@ -426,7 +426,7 @@ struct jvmtiInterface_1_ jvmti</xsl:text>
|
||||||
<xsl:value-of select="$space"/>
|
<xsl:value-of select="$space"/>
|
||||||
<xsl:text>ThreadInVMfromNative __tiv(current_thread);</xsl:text>
|
<xsl:text>ThreadInVMfromNative __tiv(current_thread);</xsl:text>
|
||||||
<xsl:value-of select="$space"/>
|
<xsl:value-of select="$space"/>
|
||||||
<xsl:text>__ENTRY(jvmtiError, </xsl:text>
|
<xsl:text>VM_ENTRY_BASE(jvmtiError, </xsl:text>
|
||||||
<xsl:apply-templates select="." mode="functionid"/>
|
<xsl:apply-templates select="." mode="functionid"/>
|
||||||
<xsl:text> , current_thread)</xsl:text>
|
<xsl:text> , current_thread)</xsl:text>
|
||||||
<xsl:value-of select="$space"/>
|
<xsl:value-of select="$space"/>
|
||||||
|
|
|
@ -173,7 +173,7 @@ JvmtiEnv::GetThreadLocalStorage(jthread thread, void** data_ptr) {
|
||||||
// from native so as to resolve the jthread.
|
// from native so as to resolve the jthread.
|
||||||
|
|
||||||
ThreadInVMfromNative __tiv(current_thread);
|
ThreadInVMfromNative __tiv(current_thread);
|
||||||
__ENTRY(jvmtiError, JvmtiEnv::GetThreadLocalStorage , current_thread)
|
VM_ENTRY_BASE(jvmtiError, JvmtiEnv::GetThreadLocalStorage , current_thread)
|
||||||
debug_only(VMNativeEntryWrapper __vew;)
|
debug_only(VMNativeEntryWrapper __vew;)
|
||||||
|
|
||||||
oop thread_oop = JNIHandles::resolve_external_guard(thread);
|
oop thread_oop = JNIHandles::resolve_external_guard(thread);
|
||||||
|
|
|
@ -373,7 +373,7 @@ JvmtiExport::get_jvmti_interface(JavaVM *jvm, void **penv, jint version) {
|
||||||
JavaThread* current_thread = (JavaThread*) ThreadLocalStorage::thread();
|
JavaThread* current_thread = (JavaThread*) ThreadLocalStorage::thread();
|
||||||
// transition code: native to VM
|
// transition code: native to VM
|
||||||
ThreadInVMfromNative __tiv(current_thread);
|
ThreadInVMfromNative __tiv(current_thread);
|
||||||
__ENTRY(jvmtiEnv*, JvmtiExport::get_jvmti_interface, current_thread)
|
VM_ENTRY_BASE(jvmtiEnv*, JvmtiExport::get_jvmti_interface, current_thread)
|
||||||
debug_only(VMNativeEntryWrapper __vew;)
|
debug_only(VMNativeEntryWrapper __vew;)
|
||||||
|
|
||||||
JvmtiEnv *jvmti_env = JvmtiEnv::create_a_jvmti(version);
|
JvmtiEnv *jvmti_env = JvmtiEnv::create_a_jvmti(version);
|
||||||
|
|
|
@ -72,9 +72,9 @@ class HandleMarkCleaner: public StackObj {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
// InterfaceSupport provides functionality used by the __LEAF and __ENTRY
|
// InterfaceSupport provides functionality used by the VM_LEAF_BASE and
|
||||||
// macros. These macros are used to guard entry points into the VM and
|
// VM_ENTRY_BASE macros. These macros are used to guard entry points into
|
||||||
// perform checks upon leave of the VM.
|
// the VM and perform checks upon leave of the VM.
|
||||||
|
|
||||||
|
|
||||||
class InterfaceSupport: AllStatic {
|
class InterfaceSupport: AllStatic {
|
||||||
|
@ -433,7 +433,7 @@ class RuntimeHistogramElement : public HistogramElement {
|
||||||
|
|
||||||
// LEAF routines do not lock, GC or throw exceptions
|
// LEAF routines do not lock, GC or throw exceptions
|
||||||
|
|
||||||
#define __LEAF(result_type, header) \
|
#define VM_LEAF_BASE(result_type, header) \
|
||||||
TRACE_CALL(result_type, header) \
|
TRACE_CALL(result_type, header) \
|
||||||
debug_only(NoHandleMark __hm;) \
|
debug_only(NoHandleMark __hm;) \
|
||||||
/* begin of body */
|
/* begin of body */
|
||||||
|
@ -441,7 +441,7 @@ class RuntimeHistogramElement : public HistogramElement {
|
||||||
|
|
||||||
// ENTRY routines may lock, GC and throw exceptions
|
// ENTRY routines may lock, GC and throw exceptions
|
||||||
|
|
||||||
#define __ENTRY(result_type, header, thread) \
|
#define VM_ENTRY_BASE(result_type, header, thread) \
|
||||||
TRACE_CALL(result_type, header) \
|
TRACE_CALL(result_type, header) \
|
||||||
HandleMarkCleaner __hm(thread); \
|
HandleMarkCleaner __hm(thread); \
|
||||||
Thread* THREAD = thread; \
|
Thread* THREAD = thread; \
|
||||||
|
@ -450,7 +450,7 @@ class RuntimeHistogramElement : public HistogramElement {
|
||||||
|
|
||||||
// QUICK_ENTRY routines behave like ENTRY but without a handle mark
|
// QUICK_ENTRY routines behave like ENTRY but without a handle mark
|
||||||
|
|
||||||
#define __QUICK_ENTRY(result_type, header, thread) \
|
#define VM_QUICK_ENTRY_BASE(result_type, header, thread) \
|
||||||
TRACE_CALL(result_type, header) \
|
TRACE_CALL(result_type, header) \
|
||||||
debug_only(NoHandleMark __hm;) \
|
debug_only(NoHandleMark __hm;) \
|
||||||
Thread* THREAD = thread; \
|
Thread* THREAD = thread; \
|
||||||
|
@ -463,20 +463,20 @@ class RuntimeHistogramElement : public HistogramElement {
|
||||||
#define IRT_ENTRY(result_type, header) \
|
#define IRT_ENTRY(result_type, header) \
|
||||||
result_type header { \
|
result_type header { \
|
||||||
ThreadInVMfromJava __tiv(thread); \
|
ThreadInVMfromJava __tiv(thread); \
|
||||||
__ENTRY(result_type, header, thread) \
|
VM_ENTRY_BASE(result_type, header, thread) \
|
||||||
debug_only(VMEntryWrapper __vew;)
|
debug_only(VMEntryWrapper __vew;)
|
||||||
|
|
||||||
|
|
||||||
#define IRT_LEAF(result_type, header) \
|
#define IRT_LEAF(result_type, header) \
|
||||||
result_type header { \
|
result_type header { \
|
||||||
__LEAF(result_type, header) \
|
VM_LEAF_BASE(result_type, header) \
|
||||||
debug_only(No_Safepoint_Verifier __nspv(true);)
|
debug_only(No_Safepoint_Verifier __nspv(true);)
|
||||||
|
|
||||||
|
|
||||||
#define IRT_ENTRY_NO_ASYNC(result_type, header) \
|
#define IRT_ENTRY_NO_ASYNC(result_type, header) \
|
||||||
result_type header { \
|
result_type header { \
|
||||||
ThreadInVMfromJavaNoAsyncException __tiv(thread); \
|
ThreadInVMfromJavaNoAsyncException __tiv(thread); \
|
||||||
__ENTRY(result_type, header, thread) \
|
VM_ENTRY_BASE(result_type, header, thread) \
|
||||||
debug_only(VMEntryWrapper __vew;)
|
debug_only(VMEntryWrapper __vew;)
|
||||||
|
|
||||||
// Another special case for nmethod_entry_point so the nmethod that the
|
// Another special case for nmethod_entry_point so the nmethod that the
|
||||||
|
@ -487,7 +487,7 @@ class RuntimeHistogramElement : public HistogramElement {
|
||||||
result_type header { \
|
result_type header { \
|
||||||
nmethodLocker _nmlock(nm); \
|
nmethodLocker _nmlock(nm); \
|
||||||
ThreadInVMfromJavaNoAsyncException __tiv(thread); \
|
ThreadInVMfromJavaNoAsyncException __tiv(thread); \
|
||||||
__ENTRY(result_type, header, thread)
|
VM_ENTRY_BASE(result_type, header, thread)
|
||||||
|
|
||||||
#define IRT_END }
|
#define IRT_END }
|
||||||
|
|
||||||
|
@ -497,20 +497,20 @@ class RuntimeHistogramElement : public HistogramElement {
|
||||||
#define JRT_ENTRY(result_type, header) \
|
#define JRT_ENTRY(result_type, header) \
|
||||||
result_type header { \
|
result_type header { \
|
||||||
ThreadInVMfromJava __tiv(thread); \
|
ThreadInVMfromJava __tiv(thread); \
|
||||||
__ENTRY(result_type, header, thread) \
|
VM_ENTRY_BASE(result_type, header, thread) \
|
||||||
debug_only(VMEntryWrapper __vew;)
|
debug_only(VMEntryWrapper __vew;)
|
||||||
|
|
||||||
|
|
||||||
#define JRT_LEAF(result_type, header) \
|
#define JRT_LEAF(result_type, header) \
|
||||||
result_type header { \
|
result_type header { \
|
||||||
__LEAF(result_type, header) \
|
VM_LEAF_BASE(result_type, header) \
|
||||||
debug_only(JRT_Leaf_Verifier __jlv;)
|
debug_only(JRT_Leaf_Verifier __jlv;)
|
||||||
|
|
||||||
|
|
||||||
#define JRT_ENTRY_NO_ASYNC(result_type, header) \
|
#define JRT_ENTRY_NO_ASYNC(result_type, header) \
|
||||||
result_type header { \
|
result_type header { \
|
||||||
ThreadInVMfromJavaNoAsyncException __tiv(thread); \
|
ThreadInVMfromJavaNoAsyncException __tiv(thread); \
|
||||||
__ENTRY(result_type, header, thread) \
|
VM_ENTRY_BASE(result_type, header, thread) \
|
||||||
debug_only(VMEntryWrapper __vew;)
|
debug_only(VMEntryWrapper __vew;)
|
||||||
|
|
||||||
// Same as JRT Entry but allows for return value after the safepoint
|
// Same as JRT Entry but allows for return value after the safepoint
|
||||||
|
@ -543,11 +543,11 @@ extern "C" { \
|
||||||
assert( !VerifyJNIEnvThread || (thread == Thread::current()), "JNIEnv is only valid in same thread"); \
|
assert( !VerifyJNIEnvThread || (thread == Thread::current()), "JNIEnv is only valid in same thread"); \
|
||||||
ThreadInVMfromNative __tiv(thread); \
|
ThreadInVMfromNative __tiv(thread); \
|
||||||
debug_only(VMNativeEntryWrapper __vew;) \
|
debug_only(VMNativeEntryWrapper __vew;) \
|
||||||
__ENTRY(result_type, header, thread)
|
VM_ENTRY_BASE(result_type, header, thread)
|
||||||
|
|
||||||
|
|
||||||
// Ensure that the VMNativeEntryWrapper constructor, which can cause
|
// Ensure that the VMNativeEntryWrapper constructor, which can cause
|
||||||
// a GC, is called outside the NoHandleMark (set via __QUICK_ENTRY).
|
// a GC, is called outside the NoHandleMark (set via VM_QUICK_ENTRY_BASE).
|
||||||
#define JNI_QUICK_ENTRY(result_type, header) \
|
#define JNI_QUICK_ENTRY(result_type, header) \
|
||||||
extern "C" { \
|
extern "C" { \
|
||||||
result_type JNICALL header { \
|
result_type JNICALL header { \
|
||||||
|
@ -555,7 +555,7 @@ extern "C" { \
|
||||||
assert( !VerifyJNIEnvThread || (thread == Thread::current()), "JNIEnv is only valid in same thread"); \
|
assert( !VerifyJNIEnvThread || (thread == Thread::current()), "JNIEnv is only valid in same thread"); \
|
||||||
ThreadInVMfromNative __tiv(thread); \
|
ThreadInVMfromNative __tiv(thread); \
|
||||||
debug_only(VMNativeEntryWrapper __vew;) \
|
debug_only(VMNativeEntryWrapper __vew;) \
|
||||||
__QUICK_ENTRY(result_type, header, thread)
|
VM_QUICK_ENTRY_BASE(result_type, header, thread)
|
||||||
|
|
||||||
|
|
||||||
#define JNI_LEAF(result_type, header) \
|
#define JNI_LEAF(result_type, header) \
|
||||||
|
@ -563,7 +563,7 @@ extern "C" { \
|
||||||
result_type JNICALL header { \
|
result_type JNICALL header { \
|
||||||
JavaThread* thread=JavaThread::thread_from_jni_environment(env); \
|
JavaThread* thread=JavaThread::thread_from_jni_environment(env); \
|
||||||
assert( !VerifyJNIEnvThread || (thread == Thread::current()), "JNIEnv is only valid in same thread"); \
|
assert( !VerifyJNIEnvThread || (thread == Thread::current()), "JNIEnv is only valid in same thread"); \
|
||||||
__LEAF(result_type, header)
|
VM_LEAF_BASE(result_type, header)
|
||||||
|
|
||||||
|
|
||||||
// Close the routine and the extern "C"
|
// Close the routine and the extern "C"
|
||||||
|
@ -579,7 +579,7 @@ extern "C" { \
|
||||||
JavaThread* thread=JavaThread::thread_from_jni_environment(env); \
|
JavaThread* thread=JavaThread::thread_from_jni_environment(env); \
|
||||||
ThreadInVMfromNative __tiv(thread); \
|
ThreadInVMfromNative __tiv(thread); \
|
||||||
debug_only(VMNativeEntryWrapper __vew;) \
|
debug_only(VMNativeEntryWrapper __vew;) \
|
||||||
__ENTRY(result_type, header, thread)
|
VM_ENTRY_BASE(result_type, header, thread)
|
||||||
|
|
||||||
|
|
||||||
#define JVM_ENTRY_NO_ENV(result_type, header) \
|
#define JVM_ENTRY_NO_ENV(result_type, header) \
|
||||||
|
@ -588,7 +588,7 @@ extern "C" { \
|
||||||
JavaThread* thread = (JavaThread*)ThreadLocalStorage::thread(); \
|
JavaThread* thread = (JavaThread*)ThreadLocalStorage::thread(); \
|
||||||
ThreadInVMfromNative __tiv(thread); \
|
ThreadInVMfromNative __tiv(thread); \
|
||||||
debug_only(VMNativeEntryWrapper __vew;) \
|
debug_only(VMNativeEntryWrapper __vew;) \
|
||||||
__ENTRY(result_type, header, thread)
|
VM_ENTRY_BASE(result_type, header, thread)
|
||||||
|
|
||||||
|
|
||||||
#define JVM_QUICK_ENTRY(result_type, header) \
|
#define JVM_QUICK_ENTRY(result_type, header) \
|
||||||
|
@ -597,14 +597,14 @@ extern "C" { \
|
||||||
JavaThread* thread=JavaThread::thread_from_jni_environment(env); \
|
JavaThread* thread=JavaThread::thread_from_jni_environment(env); \
|
||||||
ThreadInVMfromNative __tiv(thread); \
|
ThreadInVMfromNative __tiv(thread); \
|
||||||
debug_only(VMNativeEntryWrapper __vew;) \
|
debug_only(VMNativeEntryWrapper __vew;) \
|
||||||
__QUICK_ENTRY(result_type, header, thread)
|
VM_QUICK_ENTRY_BASE(result_type, header, thread)
|
||||||
|
|
||||||
|
|
||||||
#define JVM_LEAF(result_type, header) \
|
#define JVM_LEAF(result_type, header) \
|
||||||
extern "C" { \
|
extern "C" { \
|
||||||
result_type JNICALL header { \
|
result_type JNICALL header { \
|
||||||
VM_Exit::block_if_vm_exited(); \
|
VM_Exit::block_if_vm_exited(); \
|
||||||
__LEAF(result_type, header)
|
VM_LEAF_BASE(result_type, header)
|
||||||
|
|
||||||
|
|
||||||
#define JVM_END } }
|
#define JVM_END } }
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue