Main Page | Namespace List | Alphabetical List | Data Structures | Directories | File List | Data Fields | Globals | Related Pages

jlObject.c File Reference


Detailed Description

Native implementation of java.lang.Object.

Todo:
Perform intelligent check on input parameter objhash range for all functions.
Todo:
In real life, the objhashthis values and clsidxthis values will be valid or these functions could not be invoked since these data types are mandatory for referencing them. This probably means that the parameter valididty checking could probably be relaxed.

Control

$URL: https://svn.apache.org/path/name/jlObject.c $ $Id: jlObject.c 0 09/28/2005 dlydick $

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.

Version:
$LastChangedRevision: 0 $
Date:
$LastChangedDate: 09/28/2005 $
Author:
$LastChangedBy: dlydick $ Original code contributed by Daniel Lydick on 09/28/2005.

Reference

Definition in file jlObject.c.

#include "arch.h"
#include "jvmcfg.h"
#include "classfile.h"
#include "jvm.h"
#include "linkage.h"
#include "jvmclass.h"

Go to the source code of this file.

Native implementation of object instance functions.

The object hash of this object is always passed as the first parameter.

jvm_object_hash jlObject_getClass (jvm_object_hash objhashthis)
 JNI hook to getClass().
jvm_object_hash jlObject_hashCode (jvm_object_hash objhashthis)
 JNI hook to hashCode().

Native implementations of java.lang.Object.wait() functions.

Implementation of related functions java.lang.Object.wait() and java.lang.Object.wait(jlong) .

If this thread is not THREAD_STATUS_INUSE, result is jfalse. Results are undefined if thread has the SLEEP, JOIN4EVER, JOINTIMED, or INTERRUPTIBLEIO status or if thread has been NOTIFIED or INTERRUPTED.

This will only succeed if thread is in RUNNING state.

It will fail of thread did not hold the object's monitor lock so it could release it here.

Parameters:
objhashthis Object table hash of this object.
sleeptime Number of timer ticks (milliseconds) to sleep.
Returns:
jvoid
Exceptions:
JVMCLASS_JAVA_LANG_INTERRUPTEDEXCEPTION if another thread had interrupted this thread.
JVMCLASS_JAVA_LANG_ILLEGALMONITORSTATEEXCEPTION if current thread does not own the object's monitor lock.
Todo:
Make sure thread interruption logic below here is working.


jvoid jlObject_wait4ever (jvm_object_hash objhashthis)
 JNI hook to wait4ever().
jvoid jlObject_waittimed (jvm_object_hash objhashthis, jlong sleeptime)
 JNI hook to waittimed().

Functions

static void jlObject_c_dummy (void)

Variables

static char * jlObject_c_copyright = "\0" "$URL: https://svn.apache.org/path/name/jlObject.c $ $Id: jlObject.c 0 09/28/2005 dlydick $" " " "Copyright 2005 The Apache Software Foundation or its licensors, as applicable."


Function Documentation

static void jlObject_c_dummy void   )  [static]
 

Definition at line 49 of file jlObject.c.

jvm_object_hash jlObject_getClass jvm_object_hash  objhashthis  ) 
 

JNI hook to getClass().

Parameters:
objhashthis Object table hash of this object.
Returns:
java.lang.Object of OBJECT(objhashthis)

Definition at line 102 of file jlObject.c.

References CLASS, and OBJECT_CLASS_LINKAGE.

Referenced by Java_java_lang_Object_getClass(), and native_run_local_return_jobject().

jvm_object_hash jlObject_hashCode jvm_object_hash  objhashthis  ) 
 

JNI hook to hashCode().

Parameters:
objhashthis Object table hash of this object.
Returns:
input objhashthis by definition

Definition at line 121 of file jlObject.c.

Referenced by Java_java_lang_Object_hashCode(), and native_run_local_return_jint().

jvoid jlObject_wait4ever jvm_object_hash  objhashthis  ) 
 

JNI hook to wait4ever().

< This slot contains an object

< Object is a java/Lang/Thread < This slot contains an object

< Object is a java/Lang/Thread < This slot contains an object

< Object is a java/Lang/Thread < This slot contains a thread

< This slot contains an object

< Object is a java/Lang/Thread < Null thread (only 1 exists in normal use, any else besides the JVMCFG_NULL_THREAD is a thread slot that is being initialized.)

< This slot contains an object

< Object is a java/Lang/Thread < This slot contains an object

< Object is a java/Lang/Thread < This slot contains an object

< This slot contains an object

< Object is a java/Lang/Thread < NULL object (only 1 exists in normal use, any else besides the JVMCFG_NULL_OBJECT is an object slot now being initialized.)

< This slot contains an object

< Object is a java/Lang/Thread < Object is a java/Lang/Thread < Object monitor locked by mlock_thridx

< Access structures of the thread now running in the JVM.

< thread is unconditionally waiting

< Access structures of the thread now running in the JVM.

< thread threw a java.lang.Exception (but NOT a java.lang.Error). The object type is found in pThrowableEvent and is not rnull.

Definition at line 174 of file jlObject.c.

References CURRENT_THREAD, JVMCLASS_JAVA_LANG_ILLEGALMONITORSTATEEXCEPTION, OBJECT, OBJECT_CLASS_LINKAGE, OBJECT_STATUS_MLOCK, OBJECT_THREAD_LINKAGE, objectutil_release(), rtrue, THREAD, THREAD_STATUS_THREW_EXCEPTION, THREAD_STATUS_WAIT4EVER, thread_throw_exception(), VERIFY_OBJECT_THREAD_LINKAGE, and VERIFY_THREAD_LINKAGE.

Referenced by Java_java_lang_Object_wait(), and native_run_local_return_jvoid().

jvoid jlObject_waittimed jvm_object_hash  objhashthis,
jlong  sleeptime
 

JNI hook to waittimed().

< This slot contains an object

< Object is a java/Lang/Thread < This slot contains an object

< Object is a java/Lang/Thread < This slot contains an object

< Object is a java/Lang/Thread < This slot contains a thread

< This slot contains an object

< Object is a java/Lang/Thread < Null thread (only 1 exists in normal use, any else besides the JVMCFG_NULL_THREAD is a thread slot that is being initialized.)

< This slot contains an object

< Object is a java/Lang/Thread < This slot contains an object

< Object is a java/Lang/Thread < This slot contains an object

< This slot contains an object

< Object is a java/Lang/Thread < NULL object (only 1 exists in normal use, any else besides the JVMCFG_NULL_OBJECT is an object slot now being initialized.)

< This slot contains an object

< Object is a java/Lang/Thread < Object is a java/Lang/Thread < Object monitor locked by mlock_thridx

< Access structures of the thread now running in the JVM.

< thread has joined another, but is waiting for a finite time

< Access structures of the thread now running in the JVM.

< thread threw a java.lang.Exception (but NOT a java.lang.Error). The object type is found in pThrowableEvent and is not rnull.

Definition at line 239 of file jlObject.c.

References jvm_object_hash_null, OBJECT_THREAD_LINKAGE, rtrue, VERIFY_OBJECT_THREAD_LINKAGE, and VERIFY_THREAD_LINKAGE.

Referenced by Java_java_lang_Object_wait__J(), and native_run_local_return_jvoid().


Variable Documentation

char* jlObject_c_copyright = "\0" "$URL: https://svn.apache.org/path/name/jlObject.c $ $Id: jlObject.c 0 09/28/2005 dlydick $" " " "Copyright 2005 The Apache Software Foundation or its licensors, as applicable." [static]
 

Definition at line 49 of file jlObject.c.


Generated on Fri Sep 30 19:00:14 2005 by  doxygen 1.4.4