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

util.h File Reference


Detailed Description

Miscellaneous utility macros and function prototypes.

Source files whose function prototypes are defined herein include:

argv.c

bytegames.c

classpath.c

jvm.c

manifest.c

stdio.c

timeslice.c

tmparea.c

In order to separate the structure packing demands of typedef struct {} ClassFile, the following files will not have their prototypes defined here, even though they are utility functions:

nts.c

unicode.c

utf.c

Control

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

Go to the source code of this file.

Defines

#define GETRI4(ptr)   bytegames_getri4(ptr)
#define GETRL8(ptr)   bytegames_getrl8(ptr)
#define GETRS2(ptr)   bytegames_getrs2(ptr)
#define MACHINE_JINT_SWAP(p1)
#define MACHINE_JLONG_MIX(p1)
#define MACHINE_JLONG_MIX_PTR(p1)
#define MACHINE_JLONG_SWAP(p1)
#define MACHINE_JLONG_SWAP_PTR(p1)
#define MACHINE_JSHORT_SWAP(p1)
#define MACHINE_JSHORT_SWAP_PTR(p1)

Functions

 ARCH_COPYRIGHT_APACHE (util, h,"$URL: https://svn.apache.org/path/name/util.h $ $Id: util.h 0 09/28/2005 dlydick $")
rvoid argv_copyrightmsg (rvoid)
 Show program copyright message to standard output.
rvoid argv_helpmsg (rvoid)
 Show program syntax and usage message to standard output.
rvoid argv_init (int argc, char **argv, char **envp)
 Parse command line.
rvoid argv_licensemsg (rvoid)
 Show program software license message to standard output.
rvoid argv_showmsg (rvoid)
 Show resolution of command line to standard output.
rvoid argv_shutdown (rvoid)
 Clean up from argv[] setup after JVM execution.
rvoid argv_versionmsg (rvoid)
 Show program version message to standard output.
jdouble bytegames_combine_jdouble (jint msword, jint lsword)
 Combine two jint words into a jdouble.
jlong bytegames_combine_jlong (jint msword, jint lsword)
 Combine two jint words into a jlong.
ruint bytegames_getri4 (ruint *ptr4)
 4-byte version of bytegames_getrs2(), but performs two odd-byte accesses, not just one.
rulong bytegames_getrl8 (rulong *ptr8)
 8-byte version of bytegames_getri4(), but performs four odd-byte accesses, not just one.
rushort bytegames_getrs2 (rushort *ptr2)
 Retrieve any generic 2-byte value (16 bits), whether or not its is aligned on a 2-byte (that is, even address) boundary.
rulong bytegames_mix8 (rulong val)
 Mix up 8 bytes for a little-endian machine rushort value to a big-endian Java real machine implementation rushort value in the same way as bytegames_swap8(), but store the words MS first, LS second.
rvoid bytegames_putri4 (ruint *ptr4, ruint val4)
 Store any generic 4-byte value (32 bits), whether or not its is aligned on a 2-byte (that is, even address) boundary.
rvoid bytegames_putrl8 (rulong *ptr8, rulong val8)
 Store any generic 8-byte value (64 bits), whether or not its is aligned on a 2-byte (that is, even address) boundary.This function is the inverse of bytegames_getrl8() above, which see for further explanation.
rvoid bytegames_putrs2 (rushort *ptr2, rushort val2)
 Store any generic 2-byte value (16 bits), whether or not its is aligned on a 2-byte (that is, even address) boundary.
rvoid bytegames_split_jdouble (jdouble splitdouble, jint *msword, jint *lsword)
 Split a jdouble into two jint words.
rvoid bytegames_split_jlong (jlong splitlong, jint *msword, jint *lsword)
 Split a jlong into two jint words.
rushort bytegames_swap2 (rushort val)
 Swap 2 bytes for a little-endian machine rushort value to a big-endian Java real machine implementation rushort value.
ruint bytegames_swap4 (ruint val)
 Swap 4 bytes for a little-endian machine ruint value to a big-endian Java real machine implementation ruint value.
rulong bytegames_swap8 (rulong val)
 Swap 8 bytes for a little-endian machine rulong value to a big-endian Java real machine implementation rulong value.
jvm_debug_level_enum jvmutil_get_dml (rvoid)
rvoid jvmutil_print_error_stack (jvm_thread_index thridx)
 Print basic stack frame summary reporting an error versus an exception.
rvoid jvmutil_print_exception_stack (jvm_thread_index thridx)
 Print basic stack frame summary reporting an exception versus an error.
rvoid jvmutil_print_stack (jvm_thread_index thridx, rchar *pheader)
 Print basic stack frame summary only.
rvoid jvmutil_print_stack_details (jvm_thread_index thridx, rchar *pheader)
 Print stack frame with some details.
rvoid jvmutil_print_stack_locals (jvm_thread_index thridx, rchar *pheader)
 Print stack frame with details and local variables.
rvoid jvmutil_set_dml (jvm_debug_level_enum level)
 Set current debug message level.
rcharmanifest_get_main (rchar *mnfname)
 Search a JAR manifest file for a main class attribute.
jlong timeslice_get_thread_sleeptime (jvm_thread_index thridx)
 Retrieve a thread's sleeptime value safely during read of that variable on a given thread.
rvoid timeslice_init (rvoid)
void * timeslice_run (void *dummy)
 Interval timer thread.
rvoid timeslice_shutdown (rvoid)
 Shut down the time slicing mechanism for JVM shutdown.
const rchartmparea_get (rvoid)
rvoid tmparea_init (char **argv)
rvoid tmparea_shutdown (rvoid)
 Shut down the temporary directory area after JVM execution.


Define Documentation

#define GETRS2 ptr   )     bytegames_getrs2(ptr)
 

Todo:
Make sure GETRI4() works with -m64 compilations (64-bit ptrs)
Todo:
Make sure GETRL8() works with -m64 compilations (64-bit ptrs)

For internal use only.

See arch.h for the origin of architecture-specific #define's as used below:

Definition at line 119 of file util.h.

Referenced by cfattrib_loadattribute(), and classfile_loadclassdata().

#define GETRI4 ptr   )     bytegames_getri4(ptr)
 

Definition at line 120 of file util.h.

Referenced by cfattrib_loadattribute(), cfmsgs_typemsg(), and classfile_loadclassdata().

#define GETRL8 ptr   )     bytegames_getrl8(ptr)
 

Definition at line 121 of file util.h.

Referenced by cfmsgs_typemsg().

#define MACHINE_JSHORT_SWAP p1   ) 
 

For internal use only.

Big endian architectures do not need to swap anything since the JVM spec declares its (short) and (int) structures as big endian.

Definition at line 151 of file util.h.

Referenced by cfattrib_loadattribute(), and classfile_loadclassdata().

#define MACHINE_JINT_SWAP p1   ) 
 

Definition at line 152 of file util.h.

Referenced by cfattrib_loadattribute(), and classfile_loadclassdata().

#define MACHINE_JLONG_SWAP p1   ) 
 

Definition at line 153 of file util.h.

#define MACHINE_JLONG_MIX p1   ) 
 

Definition at line 154 of file util.h.

#define MACHINE_JSHORT_SWAP_PTR p1   ) 
 

Definition at line 156 of file util.h.

#define MACHINE_JLONG_SWAP_PTR p1   ) 
 

Definition at line 157 of file util.h.

#define MACHINE_JLONG_MIX_PTR p1   ) 
 

Definition at line 158 of file util.h.


Function Documentation

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

rushort bytegames_getrs2 rushort ptr2  ) 
 

Retrieve any generic 2-byte value (16 bits), whether or not its is aligned on a 2-byte (that is, even address) boundary.

This function was written to suppress SIGSEGV issues on GCC -m32 binaries on a Solaris 9.

Typical usage is in a situation of:

       rshort *pshort;
       ...
       val = *pshort;   ... If pshort is at odd address, throw SIGSEGV.
  
   

Thus convert to:

       rshort *pshort;
       ...
       val = getrs2(pshort);    ... No signal this way.
  
   

This causes two one-byte accesses to happen instead of a single two-byte access, eliminating the cause of SIGSEGV, unless, of course, the pointer is off in the weeds instead of looking at valid memory.

Parameters:
ptr2 Pointer to rushort location.
Returns:
16-bit value at *ptr2, properly byte swapped.

Definition at line 233 of file bytegames.c.

References twobyte::_byteval, and twobyte::_usval.

ruint bytegames_getri4 ruint ptr4  ) 
 

4-byte version of bytegames_getrs2(), but performs two odd-byte accesses, not just one.

This causes four one-byte accesses to happen instead of a single four-byte access, eliminating the cause of SIGSEGV.

Parameters:
ptr4 Pointer to ruint location.
Returns:
32-bit value at *ptr4, properly byte swapped.

Definition at line 302 of file bytegames.c.

References fourbyte::_byteval, and fourbyte::_ruival.

rulong bytegames_getrl8 rulong ptr8  ) 
 

8-byte version of bytegames_getri4(), but performs four odd-byte accesses, not just one.

This causes eight one-byte accesses to happen instead of a single eight-byte access, eliminating the cause of SIGSEGV.

Parameters:
ptr8 Pointer to rulong location.
Returns:
64-bit value from *ptr8, properly byte swapped.

Definition at line 376 of file bytegames.c.

References eightbyte::_byteval, eightbyte::_rulval, and bytegames_swap8().

rvoid bytegames_putrs2 rushort ptr2,
rushort  val2
 

Store any generic 2-byte value (16 bits), whether or not its is aligned on a 2-byte (that is, even address) boundary.

This function is the inverse of bytegames_getrs2() above, which see for further explanation.

Parameters:
ptr2 Pointer to rushort location.
val2 A rushort value to be stored.
Returns:
rvoid

Definition at line 268 of file bytegames.c.

References twobyte::_byteval, and twobyte::_usval.

rvoid bytegames_putri4 ruint ptr4,
ruint  val4
 

Store any generic 4-byte value (32 bits), whether or not its is aligned on a 2-byte (that is, even address) boundary.

This function is the inverse of bytegames_getri4() above, which see for further explanation.

Parameters:
ptr4 Pointer to ruint location.
val4 An ruint value to be stored.
Returns:
rvoid

Definition at line 339 of file bytegames.c.

References fourbyte::_byteval, and fourbyte::_ruival.

rvoid bytegames_putrl8 rulong ptr8,
rulong  val8
 

Store any generic 8-byte value (64 bits), whether or not its is aligned on a 2-byte (that is, even address) boundary.This function is the inverse of bytegames_getrl8() above, which see for further explanation.

Attention:
NOTICE THAT THE TERM "long" and THE CAST (long) ARE FASTIDIOUSLY AVOIDED IN ORDER TO REMOVE ANY DOUBT AS TO WHAT IS A 32-BIT VALUE AND WHAT IS A 64-BIT VALUE!
Parameters:
ptr8 Pointer to rulong location.
val8 A rulong value to be stored.
Returns:
rvoid

Definition at line 421 of file bytegames.c.

References eightbyte::_byteval, eightbyte::_rulval, and bytegames_swap8().

rushort bytegames_swap2 rushort  val  ) 
 

Swap 2 bytes for a little-endian machine rushort value to a big-endian Java real machine implementation rushort value.

Available but not used in big-endian architectures.

This routine is mapped for little-endian machines to MACHINE_JSHORT_SWAP().

   INPUT BYTE ORDER:    (a) (b)     rshort: (ab)
  
   OUTPUT BYTE ORDER:   (b) (a)     rshort: (ba)
  
   

Parameters:
val two-byte rushort to swap
Returns:
swapped byte version of val

Definition at line 497 of file bytegames.c.

References twobyte::_byteval, and twobyte::_usval.

ruint bytegames_swap4 ruint  val  ) 
 

Swap 4 bytes for a little-endian machine ruint value to a big-endian Java real machine implementation ruint value.

Available but not used in big-endian architectures.

This routine is mapped for little-endian machines to MACHINE_JINT_SWAP().

   INPUT BYTE ORDER:    (a) (b) (c) (d)     rint: (abcd)
  
   OUTPUT BYTE ORDER:   (d) (c) (b) (a)     rint: (dcba)
  
   

Parameters:
val four-byte ruint to swap
Returns:
swapped byte version of val

Definition at line 539 of file bytegames.c.

References fourbyte::_byteval, and fourbyte::_ruival.

rulong bytegames_swap8 rulong  val  ) 
 

Swap 8 bytes for a little-endian machine rulong value to a big-endian Java real machine implementation rulong value.

Available but not used in big-endian architectures.

This routine is mapped for little-endian machines to MACHINE_JLONG_SWAP().

   INPUT BYTE ORDER:  (a) (b) (c) (d) (e) (f) (g) (h)  rlong: (abcdefgh)
  
   OUTPUT BYTE ORDER: (h) (g) (f) (e) (d) (c) (b) (a)  rlong: (hgfedcba)
  
   

Parameters:
val eight-byte rulong to swap
Returns:
swapped byte version of val

Definition at line 586 of file bytegames.c.

References eightbyte::_byteval, and eightbyte::_rulval.

Referenced by bytegames_getrl8(), and bytegames_putrl8().

rulong bytegames_mix8 rulong  val  ) 
 

Mix up 8 bytes for a little-endian machine rushort value to a big-endian Java real machine implementation rushort value in the same way as bytegames_swap8(), but store the words MS first, LS second.

Available but not used in big-endian architectures.

This routine is mapped for little-endian machines to MACHINE_JLONG_MIX().

   INPUT BYTE ORDER:  (a) (b) (c) (d) (e) (f) (g) (h)  rlong: (abcdefgh)
  
   OUTPUT BYTE ORDER: (d) (c) (b) (a) (h) (g) (f) (e)  rlong: (dcbahgfe)
  
   

Parameters:
val eight-byte rulong to swap/mix
Returns:
swapped/mixed byte version of val

Definition at line 643 of file bytegames.c.

References eightbyte::_byteval, and eightbyte::_rulval.

jlong bytegames_combine_jlong jint  msword,
jint  lsword
 

Combine two jint words into a jlong.

Pass in two sequential words as jint from the JVM stack frame or operand stack or any other appropriate source and return a result as jlong

Parameters:
msword Java integer at first index.
lsword Java integer at second index, directly subsequent to msword.
Returns:
concatenation as jlong, properly byte ordered.

Definition at line 722 of file bytegames.c.

References eightbyte::_intval, and eightbyte::_julval.

jdouble bytegames_combine_jdouble jint  msword,
jint  lsword
 

Combine two jint words into a jdouble.

Pass in two sequential words as jint from the JVM stack frame or operand stack or any other appropriate source and return a result as jdouble.

Parameters:
msword Java integer at first index.
lsword Java integer at second index, directly subsequent to msword.
Returns:
concatenation as jdouble , properly byte ordered.

Definition at line 752 of file bytegames.c.

References eightbyte::_intval, and eightbyte::_jdval.

rvoid bytegames_split_jlong jlong  splitlong,
jint msword,
jint lsword
 

Split a jlong into two jint words.

Pass in a jlong and return two words suitable for storing into a JVM stack frame as a pair of local variables or into the operand stack as two sequential words. The first receives the MS word, the second receives the LS word, which should be the next sequential stack frame local variable or operand stack location.

Parameters:
[in] splitlong Java long integer to split.
[out] msword Address of MS half of split value.
[out] lsword Address of LS half of split value.
Returns:
rvoid

Definition at line 785 of file bytegames.c.

References eightbyte::_intval, and eightbyte::_julval.

Referenced by native_run_local_return_jlong(), and opcode_run().

rvoid bytegames_split_jdouble jdouble  splitdouble,
jint msword,
jint lsword
 

Split a jdouble into two jint words.

Pass in a jlong and return two words suitable for storing into a JVM stack frame as a pair of local variables or into the operand stack as two sequential words. The first receives the MS word, the second receives the LS word, which should be the next sequential stack frame local variable or operand stack location.

Parameters:
[in] splitdouble Java double float to split.
[out] msword Address of MS half of split value.
[out] lsword Address of LS half of split value.
Returns:
rvoid

Definition at line 820 of file bytegames.c.

References eightbyte::_intval, and eightbyte::_jdval.

Referenced by native_run_local_return_jdouble(), and opcode_run().

rvoid argv_init int  argc,
char **  argv,
char **  envp
 

Parse command line.

Retrieve parameters from the program entry point

 main(int argc, char **argv, char **envp) 
and parse them into internal form. Since this program is delivered primarily as a library, these will have to be reported as parameters to from the invoking program.

The syntax for the command line is:

 main_pgm_name [{-Xjh    | -Xjavahome | -Xjava_home}  dir_name]
               [{-cp     | -classpath}                dir_name]
               [{-Xbcp   | -Xbootclasspath}           dir_name]
               [{-Xdebug | -Xdebuglevel | -Xdebug_level} level]

               [-jar any/path/name/jarfilename]
               start.class.name

               [java_arg1 [java_arg2 [...]]]


 main_pgm_name -show
               -version
               -copyright
               -help

If more than one '-<token>' or '-X<token>' option entry is found on the command line for a given token type, the last one wins If one of these tokens is the last parameter on a command line, it is ignored. After the option entries are reviewed, the starting class name is specified, preceded by an optional '-jar' modifier which, if present, indicates that the specified jar file should be read to locate the starting class. Any parameters after the starting class name are passed to the JVM as '(String) args[]'.

Parameters:
argc Number of arguments on command line
argv Argument vector from the command line
envp Environment pointer from command line environ
Returns:
rvoid
< Convenient alias for DML0

< Convenient alias for DML1

< Convenient alias for DML10

Definition at line 123 of file argv.c.

References rjvm::argc, rjvm::argcj, rjvm::argv, rjvm::argv0, rjvm::argv0name, argv_copyrightmsg(), argv_helpmsg(), argv_licensemsg(), argv_showmsg(), argv_versionmsg(), rjvm::argvj, rjvm::bootclasspath, rjvm::classpath, DMLMAX, DMLMIN, DMLOFF, rjvm::envp, EXIT_ARGV_COPYRIGHT, EXIT_ARGV_HELP, EXIT_ARGV_LICENSE, EXIT_ARGV_VERSION, exit_jvm(), HEAP_GET_DATA, rjvm::java_home, jvm_argv_initialized, JVMCFG_BOOTCLASSPATH_ABBREV_PARM, JVMCFG_BOOTCLASSPATH_DEFAULT, JVMCFG_BOOTCLASSPATH_FULL_PARM, JVMCFG_CLASSPATH_ABBREV_PARM, JVMCFG_CLASSPATH_DEFAULT, JVMCFG_CLASSPATH_FULL_PARM, JVMCFG_COMMAND_LINE_COPYRIGHT_PARM, JVMCFG_COMMAND_LINE_HELP_PARM, JVMCFG_COMMAND_LINE_LICENSE_PARM, JVMCFG_COMMAND_LINE_SHOW_PARM, JVMCFG_COMMAND_LINE_VERSION_PARM, JVMCFG_DEBUGMSGLEVEL_ABBREV_PARM, JVMCFG_DEBUGMSGLEVEL_FULL_PARM, JVMCFG_DEBUGMSGLEVEL_MID_PARM, JVMCFG_ENVIRONMENT_VARIABLE_BOOTCLASSPATH, JVMCFG_ENVIRONMENT_VARIABLE_CLASSPATH, JVMCFG_ENVIRONMENT_VARIABLE_JAVA_HOME, JVMCFG_JARFILE_STARTCLASS_PARM, JVMCFG_JAVA_HOME_ABBREV_PARM, JVMCFG_JAVA_HOME_DEFAULT, JVMCFG_JAVA_HOME_FULL_PARM, JVMCFG_JAVA_HOME_MID_PARM, JVMCFG_PATHNAME_DELIMITER_CHAR, jvmutil_set_dml(), pjvm, rfalse, rnull, rtrue, rjvm::startclass, rjvm::startjar, and sysErrMsg().

rvoid argv_shutdown rvoid   ) 
 

Clean up from argv[] setup after JVM execution.

Parameters: rvoid

Returns:
rvoid

Definition at line 681 of file argv.c.

rvoid argv_versionmsg rvoid   ) 
 

Show program version message to standard output.

Parameters: rvoid

Returns:
rvoid

Definition at line 423 of file argv.c.

Referenced by argv_init().

rvoid argv_copyrightmsg rvoid   ) 
 

Show program copyright message to standard output.

Parameters: rvoid

Returns:
rvoid

Definition at line 442 of file argv.c.

Referenced by argv_init().

rvoid argv_licensemsg rvoid   ) 
 

Show program software license message to standard output.

Parameters: rvoid

Returns:
rvoid

Definition at line 465 of file argv.c.

Referenced by argv_init().

rvoid argv_helpmsg rvoid   ) 
 

Show program syntax and usage message to standard output.

Parameters: rvoid

Returns:
rvoid

Definition at line 487 of file argv.c.

Referenced by argv_init().

rvoid argv_showmsg rvoid   ) 
 

Show resolution of command line to standard output.

Parameters: rvoid

Returns:
rvoid

Definition at line 624 of file argv.c.

Referenced by argv_init().

rvoid jvmutil_set_dml jvm_debug_level_enum  level  ) 
 

Set current debug message level.

Parameters:
level New level to set.
Returns:
rvoid

Definition at line 96 of file jvmutil.c.

References rjvm::debug_message_level, and pjvm.

Referenced by argv_init().

jvm_debug_level_enum jvmutil_get_dml rvoid   ) 
 

rvoid jvmutil_print_stack jvm_thread_index  thridx,
rchar pheader
 

Print basic stack frame summary only.

Definition at line 284 of file jvmutil.c.

References jvmutil_print_stack_common(), and rfalse.

Referenced by jvmutil_print_errtype_stack(), object_run_method(), opcode_load_run_throwable(), and opcode_run().

rvoid jvmutil_print_stack_details jvm_thread_index  thridx,
rchar pheader
 

Print stack frame with some details.

Definition at line 295 of file jvmutil.c.

References jvmutil_print_stack_common(), rfalse, and rtrue.

rvoid jvmutil_print_stack_locals jvm_thread_index  thridx,
rchar pheader
 

Print stack frame with details and local variables.

Definition at line 307 of file jvmutil.c.

References jvmutil_print_stack_common(), and rtrue.

rvoid jvmutil_print_error_stack jvm_thread_index  thridx  ) 
 

Print basic stack frame summary reporting an error versus an exception.

Definition at line 358 of file jvmutil.c.

References jvmutil_print_errtype_stack().

rvoid jvmutil_print_exception_stack jvm_thread_index  thridx  ) 
 

Print basic stack frame summary reporting an exception versus an error.

Definition at line 370 of file jvmutil.c.

References jvmutil_print_errtype_stack().

rchar* manifest_get_main rchar mnfname  ) 
 

Search a JAR manifest file for a main class attribute.

This attribute MUST be all on one line and without any line continuations breaking up the class name. Look for a line of text like this, where | indicates that the following character is the first one on the line:

      |
      |Main-Class: name.of.start.class\n
      |
  
   WITHOUT any line continuations,
  
      |
      |Main-Class: name.of.sta\n
      | rt.class\n
      |
  
   

Todo:
Although such a continuation is supported by the JAR file, this implementation does not support it (yet). With this restriction, the if only one single space separates the name of the attribute and the class name, then since a line may be up to 72 characters long (that is JVMCFG_JARFILE_MANIFEST_LINE_MAX characters), then the class name may be 61 characters long.
Parameters:
mnfname JAR manifest file name, /absolute/path/name
Returns:
Heap pointer to null-terminated class name, or rnull if not found. Call HEAP_FREE_DATA() when done.
< Convenient size for any stdio msg

< Convenient size for any stdio msg

Definition at line 90 of file manifest.c.

References exit_jvm(), EXIT_MANIFEST_JAR, HEAP_FREE_DATA, HEAP_GET_DATA, JVMCFG_JARFILE_MANIFEST_MAIN_CLASS, JVMCFG_STDIO_BFR, rfalse, rnull, and sysErrMsg().

rvoid timeslice_shutdown rvoid   ) 
 

Shut down the time slicing mechanism for JVM shutdown.

Parameters: rvoid

Returns:
rvoid
Todo:
Is this necessary at JVM shutdown time?

Definition at line 295 of file timeslice.c.

References jvm_timeslice_initialized, posix_thread_id, and rfalse.

jlong timeslice_get_thread_sleeptime jvm_thread_index  thridx  ) 
 

Retrieve a thread's sleeptime value safely during read of that variable on a given thread.

Parameters:
thridx Thread index of thread to read its sleeptime value
Returns:
remaining sleep time, in timer ticks

Definition at line 133 of file timeslice.c.

References pjvm, rjvm::sleeplock, and THREAD.

Referenced by threadutil_update_wait().

void* timeslice_run void *  dummy  ) 
 

Interval timer thread.

Parameters:
dummy The setitimer(2) system call requires a (void *) that has no meaning here.
Returns:
The required (void *) is passed back, but this function never returns until the time slice thread is killed.

Definition at line 230 of file timeslice.c.

References exit_jvm(), EXIT_TIMESLICE_START, JVMCFG_TIMESLICE_PERIOD_ENABLE, JVMCFG_TIMESLICE_PERIOD_MICROSECONDS, JVMCFG_TIMESLICE_PERIOD_SECONDS, rnull, rtrue, sysErrMsg(), timeslice_period, and timeslice_tick().

Referenced by timeslice_init().

rvoid timeslice_init rvoid   ) 
 

rvoid tmparea_init char **  argv  ) 
 

Definition at line 73 of file tmparea.c.

const rchar* tmparea_get rvoid   ) 
 

rvoid tmparea_shutdown rvoid   ) 
 

Shut down the temporary directory area after JVM execution.

Parameters: rvoid

Returns:
rvoid

Definition at line 151 of file tmparea.c.


Generated on Fri Sep 30 18:50:39 2005 by  doxygen 1.4.4