From harmony-commits-return-304-apmail-incubator-harmony-commits-archive=incubator.apache.org@incubator.apache.org Thu Dec 01 06:20:21 2005 Return-Path: Delivered-To: apmail-incubator-harmony-commits-archive@www.apache.org Received: (qmail 49321 invoked from network); 1 Dec 2005 06:20:20 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 1 Dec 2005 06:20:20 -0000 Received: (qmail 2510 invoked by uid 500); 1 Dec 2005 06:16:47 -0000 Delivered-To: apmail-incubator-harmony-commits-archive@incubator.apache.org Received: (qmail 465 invoked by uid 500); 1 Dec 2005 06:15:44 -0000 Mailing-List: contact harmony-commits-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: harmony-dev@incubator.apache.org Delivered-To: mailing list harmony-commits@incubator.apache.org Received: (qmail 98818 invoked by uid 99); 1 Dec 2005 06:13:57 -0000 X-ASF-Spam-Status: No, hits=-9.4 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received: from [209.237.227.194] (HELO minotaur.apache.org) (209.237.227.194) by apache.org (qpsmtpd/0.29) with SMTP; Wed, 30 Nov 2005 22:11:23 -0800 Received: (qmail 43665 invoked by uid 65534); 1 Dec 2005 06:11:02 -0000 Message-ID: <20051201061102.43663.qmail@minotaur.apache.org> Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r350181 [46/198] - in /incubator/harmony/enhanced/trunk/sandbox/contribs/ibm_core: ./ depends/ depends/files/ depends/jars/ depends/libs/ depends/libs/linux.IA32/ depends/libs/win.IA32/ depends/oss/ depends/oss/linux.IA32/ depends/oss/win.I... Date: Thu, 01 Dec 2005 06:04:00 -0000 To: harmony-commits@incubator.apache.org From: geirm@apache.org X-Mailer: svnmailer-1.0.5 X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Added: incubator/harmony/enhanced/trunk/sandbox/contribs/ibm_core/doc/vm_doc/html/index.html URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/trunk/sandbox/contribs/ibm_core/doc/vm_doc/html/index.html?rev=350181&view=auto ============================================================================== --- incubator/harmony/enhanced/trunk/sandbox/contribs/ibm_core/doc/vm_doc/html/index.html (added) +++ incubator/harmony/enhanced/trunk/sandbox/contribs/ibm_core/doc/vm_doc/html/index.html Wed Nov 30 21:29:27 2005 @@ -0,0 +1,64 @@ + + +Harmony Class Library Porting: Main Page + + + + +

Harmony Class Library Porting Documentation

+

+

1.0

Porting Structure

+

+The class libraries use a number of external components to make them portable:

    +
  • +a Virtual Machine (VM),
  • +
  • +platform porting, threading, zip support, and pooling libraries, and
  • +
  • +existing open source floating point (fdlibm) and compression (zlib) libraries.
  • +
+The figure below shows how these components relate to one another and identifies a "VM interface" which is explained in the next section.

+

+vmport.gif +

Porting Structure

+

Porting to Alternate VMs

+

+
+ The class libraries are comprised of Java code and JNI native code. One of the design objectives of the class libraries enables them to be ported to alternate VMs. To support the class libraries, the VM Vendor must implement a C interface known as the VM Interface and a Java interface consisting of a small number of Java classes known as the Kernel Java classes.

+The Kernel classes are considered part of the VM component since the VM and these classes may understand each other's implementations rather than necessarily only using each other's external public interfaces. The VM is responsible for providing the implementation of the Kernel classes, although reference implementations of parts of these classes are provided as a possible starting point.

+The C VM Interface exposes VM entry points required by the class library JNI natives.

+

+vminterfaces.gif +

VM C and Java Interfaces

+ Implementations of platform porting, threading, compression, and floating point libraries are provided with the class library code. These libraries are described in the list of so-called 'modules' generated from the source code by doxygen. A doxygen module is simply a named collection of items from the source code. The documented Harmony Natives, Port, Thread, Zip Support, and Pool modules are part of the contribution. The zlib compression library, used by the Zip Support, and the fdlibm floating point library come from existing open source projects.

+So the minimum that a VM Vendor must supply is an implementation of the VM Interface and Kernel Java Classes.

+

Physical Packaging

+

+The packaging of Harmony code and a VM into executable programs and DLLs is shown below with an indication of how these link together.

+

+packaging.gif +

Physical Packaging

+

Booting

+

+A launcher is provided that demonstrates the boot sequence for the VM and class library code. The sample launcher can be used by any VM that implements the class library and VM interface.

+The sequence is shown below:

+

    +
  1. +Create the port library.
  2. +
  3. +Load the Natives library and call JNI_OnLoad() to initialize the library. Note that the VM library will use the VM Interface.
  4. +
  5. +The VM needs to be configured to use the boot classpath. The boot classpath is a list of JAR files which contain the bootstrap Java class library code. The launcher provides a command-line prepend of the kernel (VM-specific) classes to the VM by specifying -Xbootclasspath/p to loads the kernel classes from the VM-specific subdirectory of jre. The boot sequence configures the bootstrap class path in the JNI_OnLoad() function and updates the "com.ibm.oti.system.class.path" system property using the VM Interface. Currently this is accomplished by reading the bootstrap entries from the bootclasspath.properties file located in the jre/lib/boot directory.
  6. +
  7. +The VM should create the system ThreadGroup by calling the ThreadGroup constructor, and stores it in a private field of java.lang.Thread.
  8. +
  9. +The VM calls a private java.lang.Thread constructor to initialize a new Thread. This constructor creates the "main" ThreadGroup by calling this ThreadGroup constructor, and the rest of the class library is loaded as a side effect of initializing the Thread object.
  10. +
+
+
+ + (c) Copyright 2005 The Apache Software Foundation or its licensors, as applicable. + +
+ + Added: incubator/harmony/enhanced/trunk/sandbox/contribs/ibm_core/doc/vm_doc/html/installdox URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/trunk/sandbox/contribs/ibm_core/doc/vm_doc/html/installdox?rev=350181&view=auto ============================================================================== --- incubator/harmony/enhanced/trunk/sandbox/contribs/ibm_core/doc/vm_doc/html/installdox (added) +++ incubator/harmony/enhanced/trunk/sandbox/contribs/ibm_core/doc/vm_doc/html/installdox Wed Nov 30 21:29:27 2005 @@ -0,0 +1,117 @@ +#!/usr/bin/perl + +%subst = ( "doxy_tag", ""); +$quiet = 0; + +if (open(F,"search.cfg")) +{ + $_= ; s/[ \t\n]*$//g ; $subst{"_doc"} = $_; + $_= ; s/[ \t\n]*$//g ; $subst{"_cgi"} = $_; +} + +while ( @ARGV ) { + $_ = shift @ARGV; + if ( s/^-// ) { + if ( /^l(.*)/ ) { + $v = ($1 eq "") ? shift @ARGV : $1; + ($v =~ /\/$/) || ($v .= "/"); + $_ = $v; + if ( /(.+)\@(.+)/ ) { + if ( exists $subst{$1} ) { + $subst{$1} = $2; + } else { + print STDERR "Unknown tag file $1 given with option -l\n"; + &usage(); + } + } else { + print STDERR "Argument $_ is invalid for option -l\n"; + &usage(); + } + } + elsif ( /^q/ ) { + $quiet = 1; + } + elsif ( /^\?|^h/ ) { + &usage(); + } + else { + print STDERR "Illegal option -$_\n"; + &usage(); + } + } + else { + push (@files, $_ ); + } +} + +foreach $sub (keys %subst) +{ + if ( $subst{$sub} eq "" ) + { + print STDERR "No substitute given for tag file `$sub'\n"; + &usage(); + } + elsif ( ! $quiet && $sub ne "_doc" && $sub ne "_cgi" ) + { + print "Substituting $subst{$sub} for each occurence of tag file $sub\n"; + } +} + +if ( ! @files ) { + if (opendir(D,".")) { + foreach $file ( readdir(D) ) { + $match = ".html"; + next if ( $file =~ /^\.\.?$/ ); + ($file =~ /$match/) && (push @files, $file); + ($file =~ "tree.js") && (push @files, $file); + } + closedir(D); + } +} + +if ( ! @files ) { + print STDERR "Warning: No input files given and none found!\n"; +} + +foreach $f (@files) +{ + if ( ! $quiet ) { + print "Editing: $f...\n"; + } + $oldf = $f; + $f .= ".bak"; + unless (rename $oldf,$f) { + print STDERR "Error: cannot rename file $oldf\n"; + exit 1; + } + if (open(F,"<$f")) { + unless (open(G,">$oldf")) { + print STDERR "Error: opening file $oldf for writing\n"; + exit 1; + } + if ($oldf ne "tree.js") { + while () { + s/doxygen\=\"([^ \"\:\t\>\<]*)\:([^ \"\t\>\<]*)\" (href|src)=\"\2/doxygen\=\"$1:$subst{$1}\" \3=\"$subst{$1}/g; + print G "$_"; + } + } + else { + while () { + s/\"([^ \"\:\t\>\<]*)\:([^ \"\t\>\<]*)\", \"\2/\"$1:$subst{$1}\" ,\"$subst{$1}/g; + print G "$_"; + } + } + } + else { + print STDERR "Warning file $f does not exist\n"; + } + unlink $f; +} + +sub usage { + print STDERR "Usage: installdox [options] [html-file [html-file ...]]\n"; + print STDERR "Options:\n"; + print STDERR " -l tagfile\@linkName tag file + URL or directory \n"; + print STDERR " -q Quiet mode\n\n"; + exit 1; +} Added: incubator/harmony/enhanced/trunk/sandbox/contribs/ibm_core/doc/vm_doc/html/jclglob__harmony_8c.html URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/trunk/sandbox/contribs/ibm_core/doc/vm_doc/html/jclglob__harmony_8c.html?rev=350181&view=auto ============================================================================== --- incubator/harmony/enhanced/trunk/sandbox/contribs/ibm_core/doc/vm_doc/html/jclglob__harmony_8c.html (added) +++ incubator/harmony/enhanced/trunk/sandbox/contribs/ibm_core/doc/vm_doc/html/jclglob__harmony_8c.html Wed Nov 30 21:29:27 2005 @@ -0,0 +1,350 @@ + + +Harmony Class Library Porting: native-src/win.IA32/archive/jclglob_harmony.c File Reference + + + + + +

jclglob_harmony.c File Reference


Detailed Description

+Harmony natives initialization API. +

+ +

+#include <string.h>
+#include "jcl.h"
+#include "jclglob.h"
+#include "zipsup.h"
+#include "hypool.h"
+ + + + + + + + + + + + + + + + + + + + + + + + + +

Typedefs

typedef props_file_entry props_file_entry
 A structure that captures a single key-value setting from the properties file.

Functions

jint decodeProperty (HyPortLibrary *portLibrary, char **scanCursor, HyPool *properties)
 Scans the buffer specified by scanCursor and attempts to locate the next key-value pair separated by the '=' sign, and terminated by the platform line delimiter.
jint readPropertiesFile (HyPortLibrary *portLibrary, char *filename, HyPool *properties)
 Read the properties file specified by filename into the pool of properties.
jint readClassPathFromPropertiesFile (JavaVM *vm)
 Initializes the bootstrap classpath used by the VM.
char * concat (HyPortLibrary *portLibrary,...)
 Concatenates a variable number of null-terminated strings into a single string using the specified port library to allocate memory.
jint JNICALL JNI_OnLoad (JavaVM *vm, void *reserved)
 This DLL is being loaded, do any initialization required.
void JNICALL JNI_OnUnload (JavaVM *vm, void *reserved)
 This DLL is being unloaded, do any clean up required.
+


Typedef Documentation

+

+ + + + +
+ + + + +
typedef struct props_file_entry props_file_entry
+
+ + + + + +
+   + + +

+A structure that captures a single key-value setting from the properties file. +

+

+


Function Documentation

+

+ + + + +
+ + + + + + + + + + + + + + + + + + +
static char * concat HyPortLibrary portLibrary,
  ...
+
+ + + + + +
+   + + +

+Concatenates a variable number of null-terminated strings into a single string using the specified port library to allocate memory. +

+The variable number of strings arguments must be terminated by a single NULL value.

+

Parameters:
+ + +
portLibrary - The port library used to allocate memory.
+
+
Returns:
The concatenated string.
+
+

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
static jint decodeProperty HyPortLibrary portLibrary,
char **  scanCursor,
HyPool *  properties
+
+ + + + + +
+   + + +

+Scans the buffer specified by scanCursor and attempts to locate the next key-value pair separated by the '=' sign, and terminated by the platform line delimiter. +

+If a key-value pair is located a new props_file_entry structure will be allocated in the properties pool, and the key and value will be copied. The scanCursor will be advanced past the entire property entry on success.

+

Parameters:
+ + + + +
portLibrary - The port library used to interact with the platform.
scanCursor - A null-terminated string containing one or more (or partial) properties.
properties - A pool from which props_file_entry structures are allocated.
+
+
Returns:
The number of properties read, -1 on error.
+
Note:
This function modifies the buffer as properties are consumed.
+
+

+ + + + +
+ + + + + + + + + + + + + + + + + + +
jint JNICALL JNI_OnLoad JavaVM *  vm,
void *  reserved
+
+ + + + + +
+   + + +

+This DLL is being loaded, do any initialization required. +

+This may be called more than once.

+

+ + + + +
+ + + + + + + + + + + + + + + + + + +
void JNICALL JNI_OnUnload JavaVM *  vm,
void *  reserved
+
+ + + + + +
+   + + +

+This DLL is being unloaded, do any clean up required. +

+This may be called more than once!!

+

+ + + + +
+ + + + + + + + + +
static jint readClassPathFromPropertiesFile JavaVM *  vm  ) 
+
+ + + + + +
+   + + +

+Initializes the bootstrap classpath used by the VM. +

+Stores the result into a system property named 'com.ibm.oti.system.class.path'.

+Reads the bootclasspath.properties file a line at a time

+

Parameters:
+ + +
vm - The JavaVM from which port library and VMI interfaces can be obtained.
+
+
Returns:
- JNI_OK on success.
+
+

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
static jint readPropertiesFile HyPortLibrary portLibrary,
char *  filename,
HyPool *  properties
+
+ + + + + +
+   + + +

+Read the properties file specified by filename into the pool of properties. +

+

Parameters:
+ + + + +
portLibrary - The port library used to interact with the platform.
filename - The file from which to read data using hyfile* functions.
properties - A pool that will contain property file entries.
+
+
Returns:
JNI_OK on success, or a JNI error code on failure.
+
+


+
+ + (c) Copyright 2005 The Apache Software Foundation or its licensors, as applicable. + +
+ + Added: incubator/harmony/enhanced/trunk/sandbox/contribs/ibm_core/doc/vm_doc/html/luniglob_8c.html URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/trunk/sandbox/contribs/ibm_core/doc/vm_doc/html/luniglob_8c.html?rev=350181&view=auto ============================================================================== --- incubator/harmony/enhanced/trunk/sandbox/contribs/ibm_core/doc/vm_doc/html/luniglob_8c.html (added) +++ incubator/harmony/enhanced/trunk/sandbox/contribs/ibm_core/doc/vm_doc/html/luniglob_8c.html Wed Nov 30 21:29:27 2005 @@ -0,0 +1,159 @@ + + +Harmony Class Library Porting: native-src/linux.IA32/luni/luniglob.c File Reference + + + + + + + +

luniglob.c File Reference


Detailed Description

+Harmony LUNI natives initialization API. +

+ +

+#include <string.h>
+#include "jcl.h"
+#include "jclglob.h"
+#include "hypool.h"
+ + + + + + + + + + + + + +

Typedefs

typedef props_file_entry props_file_entry
 A structure that captures a single key-value setting from the properties file.

Functions

jint JNICALL JNI_OnLoad (JavaVM *vm, void *reserved)
 This DLL is being loaded, do any initialization required.
void JNICALL JNI_OnUnload (JavaVM *vm, void *reserved)
 This DLL is being unloaded, do any clean up required.
+


Typedef Documentation

+

+ + + + +
+ + + + +
typedef struct props_file_entry props_file_entry
+
+ + + + + +
+   + + +

+A structure that captures a single key-value setting from the properties file. +

+

+


Function Documentation

+

+ + + + +
+ + + + + + + + + + + + + + + + + + +
jint JNICALL JNI_OnLoad JavaVM *  vm,
void *  reserved
+
+ + + + + +
+   + + +

+This DLL is being loaded, do any initialization required. +

+This may be called more than once.

+

+ + + + +
+ + + + + + + + + + + + + + + + + + +
void JNICALL JNI_OnUnload JavaVM *  vm,
void *  reserved
+
+ + + + + +
+   + + +

+This DLL is being unloaded, do any clean up required. +

+This may be called more than once!!

+


+
+ + (c) Copyright 2005 The Apache Software Foundation or its licensors, as applicable. + +
+ + Added: incubator/harmony/enhanced/trunk/sandbox/contribs/ibm_core/doc/vm_doc/html/mathglob_8c.html URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/trunk/sandbox/contribs/ibm_core/doc/vm_doc/html/mathglob_8c.html?rev=350181&view=auto ============================================================================== --- incubator/harmony/enhanced/trunk/sandbox/contribs/ibm_core/doc/vm_doc/html/mathglob_8c.html (added) +++ incubator/harmony/enhanced/trunk/sandbox/contribs/ibm_core/doc/vm_doc/html/mathglob_8c.html Wed Nov 30 21:29:27 2005 @@ -0,0 +1,114 @@ + + +Harmony Class Library Porting: native-src/win.IA32/math/mathglob.c File Reference + + + + + +

mathglob.c File Reference


Detailed Description

+Harmony Math natives initialization API. +

+ +

+#include <string.h>
+#include "jcl.h"
+#include "jclglob.h"
+ + + + + + + + + +

Functions

jint JNICALL JNI_OnLoad (JavaVM *vm, void *reserved)
 This DLL is being loaded, do any initialization required.
void JNICALL JNI_OnUnload (JavaVM *vm, void *reserved)
 This DLL is being unloaded, do any clean up required.
+


Function Documentation

+

+ + + + +
+ + + + + + + + + + + + + + + + + + +
jint JNICALL JNI_OnLoad JavaVM *  vm,
void *  reserved
+
+ + + + + +
+   + + +

+This DLL is being loaded, do any initialization required. +

+This may be called more than once.

+

+ + + + +
+ + + + + + + + + + + + + + + + + + +
void JNICALL JNI_OnUnload JavaVM *  vm,
void *  reserved
+
+ + + + + +
+   + + +

+This DLL is being unloaded, do any clean up required. +

+This may be called more than once!!

+


+
+ + (c) Copyright 2005 The Apache Software Foundation or its licensors, as applicable. + +
+ + Added: incubator/harmony/enhanced/trunk/sandbox/contribs/ibm_core/doc/vm_doc/html/modules.html URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/trunk/sandbox/contribs/ibm_core/doc/vm_doc/html/modules.html?rev=350181&view=auto ============================================================================== --- incubator/harmony/enhanced/trunk/sandbox/contribs/ibm_core/doc/vm_doc/html/modules.html (added) +++ incubator/harmony/enhanced/trunk/sandbox/contribs/ibm_core/doc/vm_doc/html/modules.html Wed Nov 30 21:29:27 2005 @@ -0,0 +1,23 @@ + + +Harmony Class Library Porting: Module Index + + + + +

Harmony Class Library Porting Modules

Here is a list of all modules: +
+
+ + (c) Copyright 2005 The Apache Software Foundation or its licensors, as applicable. + +
+ + Added: incubator/harmony/enhanced/trunk/sandbox/contribs/ibm_core/doc/vm_doc/html/packaging.gif URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/trunk/sandbox/contribs/ibm_core/doc/vm_doc/html/packaging.gif?rev=350181&view=auto ============================================================================== Binary file - no diff available. Propchange: incubator/harmony/enhanced/trunk/sandbox/contribs/ibm_core/doc/vm_doc/html/packaging.gif ------------------------------------------------------------------------------ svn:mime-type = application/octet-stream Added: incubator/harmony/enhanced/trunk/sandbox/contribs/ibm_core/doc/vm_doc/html/pages.html URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/trunk/sandbox/contribs/ibm_core/doc/vm_doc/html/pages.html?rev=350181&view=auto ============================================================================== --- incubator/harmony/enhanced/trunk/sandbox/contribs/ibm_core/doc/vm_doc/html/pages.html (added) +++ incubator/harmony/enhanced/trunk/sandbox/contribs/ibm_core/doc/vm_doc/html/pages.html Wed Nov 30 21:29:27 2005 @@ -0,0 +1,19 @@ + + +Harmony Class Library Porting: Page Index + + + + +

Harmony Class Library Porting Related Pages

Here is a list of all related documentation pages: +
+
+ + (c) Copyright 2005 The Apache Software Foundation or its licensors, as applicable. + +
+ + Added: incubator/harmony/enhanced/trunk/sandbox/contribs/ibm_core/doc/vm_doc/html/pool_8c.html URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/trunk/sandbox/contribs/ibm_core/doc/vm_doc/html/pool_8c.html?rev=350181&view=auto ============================================================================== --- incubator/harmony/enhanced/trunk/sandbox/contribs/ibm_core/doc/vm_doc/html/pool_8c.html (added) +++ incubator/harmony/enhanced/trunk/sandbox/contribs/ibm_core/doc/vm_doc/html/pool_8c.html Wed Nov 30 21:29:27 2005 @@ -0,0 +1,564 @@ + + +Harmony Class Library Porting: native-src/win.IA32/pool/pool.c File Reference + + + + + +

pool.c File Reference


Detailed Description

+Pool primitives (creation, iteration, deletion, etc. +

+) +

+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include "hypool.h"
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Functions

HyPool *VMCALL pool_new (U_32 structSize, U_32 minNumberElements, U_32 elementAlignment, UDATA poolFlags, void *(VMCALL *memAlloc)(void *, U_32), void(VMCALL *memFree)(void *, void *), void *userData)
void VMCALL pool_kill (HyPool *aPool)
 Deallocates all memory associated with a pool.
void *VMCALL pool_newElement (HyPool *aPool)
 Asks for the address of a new pool element.
void VMCALL pool_removeElement (HyPool *aPool, void *anElement)
 Deallocates an element from a pool.
void VMCALL pool_do (HyPool *aPool, void(*aFunction)(void *anElement, void *userData), void *userData)
 Calls a user provided function for each element in the list.
UDATA VMCALL pool_numElements (HyPool *aPool)
 Returns the number of elements in a given pool.
void *VMCALL pool_startDo (HyPool *aPool, pool_state *lastHandle)
void *VMCALL pool_nextDo (pool_state *lastHandle)
void VMCALL pool_sortFree (HyPool *aPool)
 Sorts the free list of the current pool.
HyPool *VMCALL pool_forPortLib (U_32 structSize, HyPortLibrary *portLibrary)
 Shortcut for pool_new, using the default malloc/free from the portLibrary.
void VMCALL pool_clear (HyPool *aPool)
 Clear the contents of a pool but not delete it.
+


Function Documentation

+

+ + + + +
+ + + + + + + + + +
pool_clear HyPool *  aPool  ) 
+
+ + + + + +
+   + + +

+Clear the contents of a pool but not delete it. +

+

Note:
Make no assumptions about the contents of the pool after invoking this method (it currently does not zero the memory)
+
Parameters:
+ + +
[in] aPool The pool to clear
+
+
Returns:
none
+
+

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
pool_do HyPool *  aPool,
void(*)(void *anElement, void *userData)  aFunction,
void *  userData
+
+ + + + + +
+   + + +

+Calls a user provided function for each element in the list. +

+

Parameters:
+ + + + +
[in] aPool The pool to "do" things to
[in] aFunction Pointer to function which will "do" things to the elements of aPool
[in] userData Pointer to data to be passed to "do" function, along with each pool-element
+
+
Returns:
none
+
See also:
pool_startDo, pool_nextDo
+
+

+ + + + +
+ + + + + + + + + + + + + + + + + + +
pool_forPortLib U_32  structSize,
HyPortLibrary portLibrary
+
+ + + + + +
+   + + +

+Shortcut for pool_new, using the default malloc/free from the portLibrary. +

+

Parameters:
+ + + +
[in] structSize size of pool-element
[in] portLibrary 
+
+
Returns:
pointer to a Pool
+
See also:
pool_new
+
+

+ + + + +
+ + + + + + + + + +
pool_kill HyPool *  aPool  ) 
+
+ + + + + +
+   + + +

+Deallocates all memory associated with a pool. +

+

Parameters:
+ + +
[in] aPool Pool to be deallocated
+
+
Returns:
none
+
+

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
pool_new U_32  structSize,
U_32  minNumberElements,
U_32  elementAlignment,
UDATA  poolFlags,
void * (VMCALL *memAlloc)(void *, U_32),
void(VMCALL *memFree)(void *, void *) ,
void *  userData
+
+ + + + + +
+   + + +

+

+pool_new

+Returns a handle to a variable sized pool of structures. This handle should be passed into all other pool functions.

+

Parameters:
+ + + + + + + + +
[in] structSize Size of the pool-elements
[in] minNumberElements If zero, will default to 1
[in] elementAlignment If zero will default to MIN_GRANULARITY
[in] poolFlags 
[in] memAlloc Allocate function pointer
[in] memFree Free function pointer
[in] userData 
+
+
Returns:
pointer to a new pool
+
+

+ + + + +
+ + + + + + + + + +
pool_newElement HyPool *  aPool  ) 
+
+ + + + + +
+   + + +

+Asks for the address of a new pool element. +

+If it succeeds, the address returned will have space for one element of the correct structure size. The contents of the element are undefined. If the current pool is full, a new one will be grafted onto the end of the pool chain and memory from there will be used.

+

Parameters:
+ + +
[in] aPool 
+
+
Returns:
NULL on error

+pointer to a new element otherwise

+
+

+ + + + +
+ + + + + + + + + +
pool_nextDo pool_state *  lastHandle  ) 
+
+ + + + + +
+   + + +

+

+pool_nextDo

+Continue an iteration based on state passed in by lastHandle. It is safe to stop an iteration midway through.

+

Parameters:
+ + +
[in] lastHandle pointer for current iteration state
+
+
Returns:
NULL nothing more to be done

+pointer to next element to be processed otherwise

+
See also:
pool_do, pool_startDo
+
+

+ + + + +
+ + + + + + + + + +
pool_numElements HyPool *  aPool  ) 
+
+ + + + + +
+   + + +

+Returns the number of elements in a given pool. +

+

Parameters:
+ + +
[in] aPool 
+
+
Returns:
0 on error

+the number of elements in the pool otherwise

+
+

+ + + + +
+ + + + + + + + + + + + + + + + + + +
pool_removeElement HyPool *  aPool,
void *  anElement
+
+ + + + + +
+   + + +

+Deallocates an element from a pool. +

+It is safe to call pool_removeElement() while looping over the pool with pool_startDo / pool_nextDo on the element returned by those calls. This is because the free element is always inserted at either the head of the free list or before the nextFree element in the pool_state.

+

Parameters:
+ + + +
[in] aPool 
[in] anElement Pointer to the element to be removed
+
+
Returns:
none
+
+

+ + + + +
+ + + + + + + + + +
pool_sortFree HyPool *  aPool  ) 
+
+ + + + + +
+   + + +

+Sorts the free list of the current pool. +

+(ie: does not follow nextPool pointers...) This is a O(n) most of the time.

+

Parameters:
+ + +
[in] aPool The pool to be sorted
+
+
Returns:
none
+
+

+ + + + +
+ + + + + + + + + + + + + + + + + + +
pool_startDo HyPool *  aPool,
pool_state *  lastHandle
+
+ + + + + +
+   + + +

+

+pool_startDo

+Start of an iteration set that will return when code is to be executed. This is based strongly on pool_sortFreeAndIterateUsed. Pass in a pointer to an empty pool_state and it will be filled in.

+

Parameters:
+ + + +
[in] aPool The pool to "do" things to
[in] lastHandle 
+
+
Returns:
NULL

+pointer to element otherwise

+
See also:
pool_do, pool_nextDo
+
+


+
+ + (c) Copyright 2005 The Apache Software Foundation or its licensors, as applicable. + +
+ + Added: incubator/harmony/enhanced/trunk/sandbox/contribs/ibm_core/doc/vm_doc/html/pool__cap_8c.html URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/trunk/sandbox/contribs/ibm_core/doc/vm_doc/html/pool__cap_8c.html?rev=350181&view=auto ============================================================================== --- incubator/harmony/enhanced/trunk/sandbox/contribs/ibm_core/doc/vm_doc/html/pool__cap_8c.html (added) +++ incubator/harmony/enhanced/trunk/sandbox/contribs/ibm_core/doc/vm_doc/html/pool__cap_8c.html Wed Nov 30 21:29:27 2005 @@ -0,0 +1,122 @@ + + +Harmony Class Library Porting: native-src/win.IA32/pool/pool_cap.c File Reference + + + + + +

pool_cap.c File Reference


Detailed Description

+Pool-capacity functions. +

+ +

+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include "hypool.h"
+ + + + + + + + + +

Functions

UDATA VMCALL pool_ensureCapacity (HyPool *aPool, UDATA newCapacity)
 Ensures that the pool is large enough for newCapacity elements.
UDATA VMCALL pool_capacity (HyPool *aPool)
 Returns the total capacity of a pool.
+


Function Documentation

+

+ + + + +
+ + + + + + + + + +
UDATA VMCALL pool_capacity HyPool *  aPool  ) 
+
+ + + + + +
+   + + +

+Returns the total capacity of a pool. +

+

Parameters:
+ + +
[in] aPool The pool
+
+
Returns:
0 on error

+numElements in aPool otherwise

+
+

+ + + + +
+ + + + + + + + + + + + + + + + + + +
UDATA VMCALL pool_ensureCapacity HyPool *  aPool,
UDATA  newCapacity
+
+ + + + + +
+   + + +

+Ensures that the pool is large enough for newCapacity elements. +

+This has the side effect of setting the POOL_NEVER_FREE_PUDDLES flag. Without this, the pool could shrink back down to its original size. Note that this does not take into account the number of elements already used in the pool.

+

Parameters:
+ + + +
[in] aPool The pool
[in] newCapacity The desired new-size of the pool
+
+
Returns:
0 on success

+-1 on failure

+
+


+
+ + (c) Copyright 2005 The Apache Software Foundation or its licensors, as applicable. + +
+ + Added: incubator/harmony/enhanced/trunk/sandbox/contribs/ibm_core/doc/vm_doc/html/structGCStatus.html URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/trunk/sandbox/contribs/ibm_core/doc/vm_doc/html/structGCStatus.html?rev=350181&view=auto ============================================================================== --- incubator/harmony/enhanced/trunk/sandbox/contribs/ibm_core/doc/vm_doc/html/structGCStatus.html (added) +++ incubator/harmony/enhanced/trunk/sandbox/contribs/ibm_core/doc/vm_doc/html/structGCStatus.html Wed Nov 30 21:29:27 2005 @@ -0,0 +1,25 @@ + + +Harmony Class Library Porting: GCStatus Struct Reference + + + + +

GCStatus Struct Reference

#include <jni.h> +

+


Detailed Description

+GCStatus structure. +

+ + +
+


The documentation for this struct was generated from the following file:
    +
  • native-src/win.IA32/include/jni.h
+
+
+ + (c) Copyright 2005 The Apache Software Foundation or its licensors, as applicable. + +
+ +