1 /* |
1 /* |
2 * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * |
4 * |
5 * This code is free software; you can redistribute it and/or modify it |
5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as |
6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. |
7 * published by the Free Software Foundation. |
429 TRACE_CALL(result_type, header) \ |
429 TRACE_CALL(result_type, header) \ |
430 debug_only(NoHandleMark __hm;) \ |
430 debug_only(NoHandleMark __hm;) \ |
431 os::verify_stack_alignment(); \ |
431 os::verify_stack_alignment(); \ |
432 /* begin of body */ |
432 /* begin of body */ |
433 |
433 |
|
434 #define VM_ENTRY_BASE_FROM_LEAF(result_type, header, thread) \ |
|
435 TRACE_CALL(result_type, header) \ |
|
436 debug_only(ResetNoHandleMark __rnhm;) \ |
|
437 HandleMarkCleaner __hm(thread); \ |
|
438 Thread* THREAD = thread; \ |
|
439 os::verify_stack_alignment(); \ |
|
440 /* begin of body */ |
|
441 |
434 |
442 |
435 // ENTRY routines may lock, GC and throw exceptions |
443 // ENTRY routines may lock, GC and throw exceptions |
436 |
444 |
437 #define VM_ENTRY_BASE(result_type, header, thread) \ |
445 #define VM_ENTRY_BASE(result_type, header, thread) \ |
438 TRACE_CALL(result_type, header) \ |
446 TRACE_CALL(result_type, header) \ |
590 result_type JNICALL header { \ |
598 result_type JNICALL header { \ |
591 VM_Exit::block_if_vm_exited(); \ |
599 VM_Exit::block_if_vm_exited(); \ |
592 VM_LEAF_BASE(result_type, header) |
600 VM_LEAF_BASE(result_type, header) |
593 |
601 |
594 |
602 |
|
603 #define JVM_ENTRY_FROM_LEAF(env, result_type, header) \ |
|
604 { { \ |
|
605 JavaThread* thread=JavaThread::thread_from_jni_environment(env); \ |
|
606 ThreadInVMfromNative __tiv(thread); \ |
|
607 debug_only(VMNativeEntryWrapper __vew;) \ |
|
608 VM_ENTRY_BASE_FROM_LEAF(result_type, header, thread) |
|
609 |
|
610 |
595 #define JVM_END } } |
611 #define JVM_END } } |
596 |
612 |
597 #endif // SHARE_VM_RUNTIME_INTERFACESUPPORT_HPP |
613 #endif // SHARE_VM_RUNTIME_INTERFACESUPPORT_HPP |