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

rjvm Struct Reference

#include <jvm.h>


Detailed Description

Define a JVM model.

This model has all the usual components, a program counter, a stack pointer and stack area, and thread defintions.

Definition at line 78 of file jvm.h.

Data Fields

int argc
 Direct copy of main(argc,,).
int argcj
 Index of argv[] passed to JVM main().
char ** argv
 Direct copy of main(,argv,).
char * argv0
 Program name, argv[0] in 'C', $0 in sh.
char * argv0name
 Program name argv0,but without path component.
char ** argvj
 Portion of argv[] passed to JVM main().
rcharbootclasspath
 BOOTCLASSPATH environment variable
rclass class [JVMCFG_MAX_CLASSES]
 Table of java.lang.Class structures.
jvm_class_index class_allocate_last
 Last class slot to be allocated by class_static_new().
rcharclasspath
 CLASSPATH environment variable
jvm_thread_index current_thread
 Thread being manipulated by JVM at the current time.
jvm_debug_level_enum debug_message_level
 Verbosity of debug messages in code.
char ** envp
 Direct copy of main(,,envp).
rcharjava_home
 JAVA_HOME environment variable
rulong jvm_instruction_count
 Total number of virtual instructions run by the JVM.
robject object [JVMCFG_MAX_OBJECTS]
 Table of java.lang.Object structures.
jvm_object_hash object_allocate_last
 Last object slot to be allocated by object_instance_new().
pthread_mutex_t sleeplock
 Thread-safe read/update mechanism for rthread.sleeptime.
rcharstartclass
 Internal name of JVM start class, as Lstart/class/name;.
rcharstartjar
 Name of JAR file containing start class, if any, else rnull.
rthread thread [JVMCFG_MAX_THREADS]
 Table of java.lang.Thread structures.
jvm_thread_index thread_new_last
 Last thread slot to be allocated by thread_new().
volatile rboolean timeslice_expired
 JVM time slice processing-- use only ONE mutex for inter-thread control of all thread sleep timers.
rbyte unused2 [3]
 4-byte alignment


Field Documentation

int rjvm::argc
 

Direct copy of main(argc,,).

Definition at line 85 of file jvm.h.

Referenced by argv_init().

char** rjvm::argv
 

Direct copy of main(,argv,).

Definition at line 86 of file jvm.h.

Referenced by argv_init().

char** rjvm::envp
 

Direct copy of main(,,envp).

Definition at line 87 of file jvm.h.

Referenced by argv_init().

char* rjvm::argv0
 

Program name, argv[0] in 'C', $0 in sh.

Definition at line 90 of file jvm.h.

Referenced by argv_init().

char* rjvm::argv0name
 

Program name argv0,but without path component.

Definition at line 93 of file jvm.h.

Referenced by argv_init().

int rjvm::argcj
 

Index of argv[] passed to JVM main().

Definition at line 96 of file jvm.h.

Referenced by argv_init().

char** rjvm::argvj
 

Portion of argv[] passed to JVM main().

Should never be rnull, but zero args will have argvj[0] as rnull, which always follows last parm (eg, if 3 args, then argvj[3] == rnull)

Definition at line 98 of file jvm.h.

Referenced by argv_init().

jvm_debug_level_enum rjvm::debug_message_level
 

Verbosity of debug messages in code.

Definition at line 106 of file jvm.h.

Referenced by jvmutil_get_dml(), and jvmutil_set_dml().

rchar* rjvm::java_home
 

JAVA_HOME environment variable

Definition at line 110 of file jvm.h.

Referenced by argv_init().

rchar* rjvm::classpath
 

CLASSPATH environment variable

Definition at line 112 of file jvm.h.

Referenced by argv_init().

rchar* rjvm::bootclasspath
 

BOOTCLASSPATH environment variable

Definition at line 114 of file jvm.h.

Referenced by argv_init().

rchar* rjvm::startclass
 

Internal name of JVM start class, as Lstart/class/name;.

Definition at line 119 of file jvm.h.

Referenced by argv_init().

rchar* rjvm::startjar
 

Name of JAR file containing start class, if any, else rnull.

Definition at line 122 of file jvm.h.

Referenced by argv_init().

volatile rboolean rjvm::timeslice_expired
 

JVM time slice processing-- use only ONE mutex for inter-thread control of all thread sleep timers.

timeslice_expired is not mutexed as a producer-consumer item of a single volatile byte.

Todo:
Verify this is okay.
The rthread.sleeptime item is a multi-byte integer, and so could be unsafe if not mutexed. (It is still made volatile just to raise the awareness of users to this issue.)

Definition at line 125 of file jvm.h.

Referenced by opcode_run(), timeslice_init(), and timeslice_tick().

rbyte rjvm::unused2[3]
 

4-byte alignment

Definition at line 140 of file jvm.h.

pthread_mutex_t rjvm::sleeplock
 

Thread-safe read/update mechanism for rthread.sleeptime.

See timeslice.c for details.

Definition at line 142 of file jvm.h.

Referenced by threadutil_update_sleeptime_interval(), timeslice_get_thread_sleeptime(), and timeslice_init().

jvm_thread_index rjvm::current_thread
 

Thread being manipulated by JVM at the current time.

Typically accessed as CURRENT_THREAD

Definition at line 160 of file jvm.h.

rulong rjvm::jvm_instruction_count
 

Total number of virtual instructions run by the JVM.

See also (rthread) thread_instruction_count and pass_instruction_count

Definition at line 167 of file jvm.h.

jvm_thread_index rjvm::thread_new_last
 

Last thread slot to be allocated by thread_new().

Definition at line 175 of file jvm.h.

Referenced by thread_init(), and thread_state_get_name().

rthread rjvm::thread[JVMCFG_MAX_THREADS]
 

Table of java.lang.Thread structures.

Indexed by jvm_thread_index integers. Typically accessed as THREAD(index)

Definition at line 178 of file jvm.h.

jvm_class_index rjvm::class_allocate_last
 

Last class slot to be allocated by class_static_new().

Definition at line 191 of file jvm.h.

Referenced by class_allocate_slot().

rclass rjvm::class[JVMCFG_MAX_CLASSES]
 

Table of java.lang.Class structures.

Indexed by jvm_class_index integers. Typically accessed as CLASS(index)

Definition at line 196 of file jvm.h.

jvm_object_hash rjvm::object_allocate_last
 

Last object slot to be allocated by object_instance_new().

Definition at line 209 of file jvm.h.

Referenced by object_allocate_slot(), and object_init().

robject rjvm::object[JVMCFG_MAX_OBJECTS]
 

Table of java.lang.Object structures.

Indexed by jvm_object_hash integers. Typically accessed as OBJECT(index) .

The jvm_object_hash index is also absolutely identical to a Java object reference and a Java array dimension reference.

Definition at line 213 of file jvm.h.


The documentation for this struct was generated from the following file:
Generated on Fri Sep 30 18:50:59 2005 by  doxygen 1.4.4