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

jvm.h File Reference


Detailed Description

Definition of the Java Virtual Machine structures running on this real machine implementation.

Everything about the state of the machine is stored here unless it is stored out in the Java code, which is in the heap.

The JVM specification is available from Sun Microsystems' web site at http://java.sun.com/docs/books/vmspec/index.html and may be read online at http://java.sun.com/docs/books/vmspec/2nd-edition/html/VMSpecTOC.doc.html

The Java 5 class file format is available as a PDF file separately at http://java.sun.com/docs/books/vmspec/2nd-edition/ClassFileFormat-final-draft.pdf and was the basis for the ClassFile structure of this implementation.

Todo:
Need to verify which web document for the Java 5 class file definition is either "official", actually correct, or is the de facto standard.

Control

$URL: https://svn.apache.org/path/name/jvm.h $ $Id: jvm.h 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 jvm.h.

#include <pthread.h>
#include <setjmp.h>
#include "jvalue.h"
#include "class.h"
#include "object.h"
#include "thread.h"

Go to the source code of this file.

Data Structures

struct  rjvm
 Define a JVM model. More...

Functions

 ARCH_COPYRIGHT_APACHE (jvm, h,"$URL: https://svn.apache.org/path/name/jvm.h $ $Id: jvm.h 0 09/28/2005 dlydick $")
rint jvm (int argc, char **argv, char **envp)
 Main entry point for this library implementing the Java Virtural Machine.
rvoid jvm_manual_thread_run (jvm_thread_index thridx, rboolean shutdown, rchar *clsname, rchar *mthname, rchar *mthdesc)
 Manually start a thread in the JVM execution engine, but outside of the normal runtime loop.

Variables

rjvmpjvm
 Declared in jvm.c .


Function Documentation

ARCH_COPYRIGHT_APACHE jvm  ,
,
"$URL: https://svn.apache.org/path/name/jvm.h $ $Id: jvm.h 0 09/28/2005 dlydick $" 
 

rvoid jvm_manual_thread_run jvm_thread_index  thridx,
rboolean  shutdown,
rchar clsname,
rchar mthname,
rchar mthdesc
 

Manually start a thread in the JVM execution engine, but outside of the normal runtime loop.

This is used typically by initialization of the main JVM engine. All parameters except thridx are for the purpose of reporting errors. The thread must have its code loaded and ready to run, and must be in the NEW state. It will be moved into the RUNNING state, allowed to run to completion, and then optionally taken through the COMPLETE state into DEAD, shut down, and the thread terminated.

The thread is typically set up via thread_class_load() in preparation to call this function.

Parameters:
thridx Thread index of thread containing an executable Java program.
shutdown rtrue if thread should be shut down after it finishes running, otherwise rfalse.
clsname Null-terminated string of name of class
mthname Null-terminated string of method to run in class
mthdesc Null-terminated string of method signature
Returns:
rvoid
< This current thread state.

< Next requested thread state.

< Previous actual thread state.

< This current thread state.

< This current thread state.

< Next requested thread state.

Definition at line 973 of file jvm.c.

References exit_jvm(), EXIT_JVM_THREAD, and sysErrMsg().

rint jvm int  argc,
char **  argv,
char **  envp
 

Main entry point for this library implementing the Java Virtural Machine.

Parameters: rvoid

Returns:
rvoid

Definition at line 2885 of file jvm.c.

Referenced by main().


Variable Documentation

rjvm* pjvm
 

Declared in jvm.c .

This pointer is initialized by jvm_model_init() and is used extensivel throughout the code, both directly and through macros like CLASS and OBJECT().

Definition at line 732 of file jvm.c.

Referenced by argv_init(), class_allocate_slot(), jvmutil_get_dml(), jvmutil_set_dml(), object_allocate_slot(), object_init(), opcode_run(), thread_init(), thread_state_get_name(), threadutil_update_sleeptime_interval(), timeslice_get_thread_sleeptime(), timeslice_init(), and timeslice_tick().


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