Of particular interest are the linkages between thread, class, and object areas.
Several useful macros are defined here. They are used to associate an object instance with its ClassFile structure, its class definition, and its thread definition, where applicable.
The macro CLASS_OBJECT_LINKAGE() associates a class definition with its object instance. The macro OBJECT_CLASS_LINKAGE() associates an object instance with its class definition.
The macro THREAD_OBJECT_LINKAGE() associates a thread definition with its object instance. The macro OBJECT_THREAD_LINKAGE() associates an object instance with its thread definition. This functionality is only meaningful when the object is a java.lang.Thread
.
The information stored in that object table entry points to both the ClassFile storage for that class and to the class table entry for that class.
Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
Licensed under the Apache License, Version 2.0 ("the License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and limitations under the License.
Definition in file linkage.h.
Go to the source code of this file.
Defines | |
#define | CLASS_OBJECT_LINKAGE(clsidx) (&OBJECT(CLASS(clsidx).class_objhash).table_linkage) |
Retrieve class information about a class from its class object. | |
#define | OBJECT_CLASS_LINKAGE(objhash) (&OBJECT(objhash).table_linkage) |
Retrieve class information about an object from its class. | |
#define | OBJECT_OBJECT_LINKAGE(objhash) |
Retrieve object information about an object from itself. | |
#define | OBJECT_THREAD_LINKAGE(objhash) |
Retrieve thread information about an object from its thread entry. | |
#define | THREAD_OBJECT_LINKAGE(thridx) |
Retrieve object information about a thread from its thread object instance. | |
#define | VERIFY_OBJECT_THREAD_LINKAGE(objhash) |
Verify that a thread slot is in use, is not a null thread, and contains a valid thread object hash. | |
#define | VERIFY_THREAD_LINKAGE(thridx) |
Verify that a thread slot is in use, is not a null thread, and contains a valid, non-null, thread object hash that is definitely marked as a thread object. | |
Functions | |
ARCH_COPYRIGHT_APACHE (linkage, h,"$URL: https://svn.apache.org/path/name/linkage.h $ $Id: linkage.h 0 09/28/2005 dlydick $") | |
rboolean | linkage_resolve_class (jvm_class_index clsidx, rboolean find_registerNatives) |
Resolve class table and object table linkages for a class file, typically one just loaded by class_static_new(). | |
rboolean | linkage_unresolve_class (jvm_class_index clsidx) |
Unresolve class table and object table linkages for a class file that is getting ready to be unloaded. |
|
Retrieve class information about a class from its class object.
Definition at line 79 of file linkage.h. Referenced by attribute_find_in_class_by_cp_entry(), attribute_find_in_class_by_enum(), attribute_find_in_field_by_cp_entry(), attribute_find_in_field_by_enum(), attribute_find_in_method_by_cp_entry(), attribute_find_in_method_by_enum(), class_load_from_prchar(), field_find_by_cp_entry(), jvmutil_print_errtype_stack(), jvmutil_print_stack_common(), linkage_resolve_class(), method_find_by_cp_entry(), method_return_type(), object_run_method(), opcode_load_run_throwable(), opcode_run(), and thread_new(). |
|
Retrieve class information about an object from its class.
Definition at line 95 of file linkage.h. Referenced by field_index_get_object_instance_pjvalue(), field_index_put_object_instance_pjvalue(), field_name_get_object_instance_pjvalue(), field_name_put_object_instance_pjvalue(), jlClass_isArray(), jlObject_getClass(), and jlObject_wait4ever(). |
|
Value: (((thridx != jvm_thread_index_null) && \ (THREAD(thridx).status & THREAD_STATUS_INUSE) && \ (!(THREAD(thridx).status & THREAD_STATUS_NULL)) && \ (THREAD(thridx).thread_objhash != jvm_object_hash_null)&& \ (OBJECT(THREAD(thridx).thread_objhash).status & \ OBJECT_STATUS_INUSE) && \ (!(OBJECT(THREAD(thridx).thread_objhash).status & \ OBJECT_STATUS_NULL)) && \ (OBJECT(THREAD(thridx).thread_objhash).status & \ OBJECT_STATUS_THREAD)) \ ? rtrue \ : rfalse)
Definition at line 115 of file linkage.h. Referenced by jlObject_wait4ever(), jlObject_waittimed(), jlThread_checkAccess(), jlThread_countStackFrames(), jlThread_interrupt(), jlThread_isAlive(), jlThread_isDaemon(), jlThread_setDaemon(), jlThread_setPriority(), and jlThread_start(). |
|
Value: ((THREAD(thridx).thread_objhash != jvm_object_hash_null) \ ? (&OBJECT(THREAD(thridx).thread_objhash).table_linkage) \ : (jvm_table_linkage *) rnull)
|
|
Value: (((OBJECT(objhash).status & OBJECT_STATUS_INUSE) && \ (OBJECT(objhash).status & OBJECT_STATUS_THREAD) && \ (jvm_thread_index_null != OBJECT(objhash).table_linkage.thridx)) \ ? (&OBJECT(objhash).table_linkage) \ : ((jvm_table_linkage *) rnull))
Definition at line 176 of file linkage.h. Referenced by jlObject_wait4ever(), jlObject_waittimed(), jlThread_checkAccess(), jlThread_countStackFrames(), jlThread_destroy(), jlThread_interrupt(), jlThread_isAlive(), jlThread_isDaemon(), jlThread_setDaemon(), jlThread_setPriority(), and jlThread_start(). |
|
Value: ((rnull != (OBJECT_THREAD_LINKAGE(objhash))) \ ? rtrue \ : rfalse)
Definition at line 199 of file linkage.h. Referenced by jlObject_wait4ever(), jlObject_waittimed(), jlThread_checkAccess(), jlThread_countStackFrames(), jlThread_interrupt(), jlThread_isAlive(), jlThread_isDaemon(), jlThread_setDaemon(), jlThread_setPriority(), and jlThread_start(). |
|
Value: ((OBJECT(objhash).status & OBJECT_STATUS_INUSE) \ ? (&OBJECT(objhash).table_linkage) \ : (jvm_table_linkage *) rnull)
Definition at line 227 of file linkage.h. Referenced by object_instance_finalize(), and object_new_setup(). |
|
|
|
|
Unresolve class table and object table linkages for a class file that is getting ready to be unloaded.
< Ref first constant item < Ref first constant item
< Invalid basetype due to malformed < Convenient alias for DML5 < Class linkages completed |