Return-Path: Delivered-To: apmail-harmony-commits-archive@www.apache.org Received: (qmail 68682 invoked from network); 9 Dec 2008 15:05:38 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 9 Dec 2008 15:05:38 -0000 Received: (qmail 51705 invoked by uid 500); 9 Dec 2008 15:05:50 -0000 Delivered-To: apmail-harmony-commits-archive@harmony.apache.org Received: (qmail 51678 invoked by uid 500); 9 Dec 2008 15:05:50 -0000 Mailing-List: contact commits-help@harmony.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@harmony.apache.org Delivered-To: mailing list commits@harmony.apache.org Received: (qmail 51665 invoked by uid 99); 9 Dec 2008 15:05:50 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 09 Dec 2008 07:05:50 -0800 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 09 Dec 2008 15:05:31 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id B931B23898C7; Tue, 9 Dec 2008 07:04:01 -0800 (PST) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r724734 [42/46] - in /harmony/standard/site: docs/externals/kernel_doc/ docs/externals/kernel_doc/html/ docs/externals/vm_doc/ docs/externals/vm_doc/html/ docs/subcomponents/classlibrary/ xdocs/subcomponents/classlibrary/ Date: Tue, 09 Dec 2008 15:03:51 -0000 To: commits@harmony.apache.org From: tellison@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20081209150401.B931B23898C7@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Propchange: harmony/standard/site/docs/externals/vm_doc/html/hythread_8c.html ------------------------------------------------------------------------------ svn:eol-style = native Added: harmony/standard/site/docs/externals/vm_doc/html/hythreadinspect_8c.html URL: http://svn.apache.org/viewvc/harmony/standard/site/docs/externals/vm_doc/html/hythreadinspect_8c.html?rev=724734&view=auto ============================================================================== --- harmony/standard/site/docs/externals/vm_doc/html/hythreadinspect_8c.html (added) +++ harmony/standard/site/docs/externals/vm_doc/html/hythreadinspect_8c.html Tue Dec 9 07:03:45 2008 @@ -0,0 +1,213 @@ + + +Harmony Class Library Porting: modules/portlib/src/main/native/thread/shared/hythreadinspect.c File Reference + + + + + +

modules/portlib/src/main/native/thread/shared/hythreadinspect.c File Reference


Detailed Description

+ +

+#include "threaddef.h"
+ + + + + + + + + + + + + + + + + + +

Functions

hythread_monitor_t VMCALL hythread_monitor_walk (hythread_monitor_t monitor)
 Walk all active monitors.
void *VMCALL hythread_tls_get (hythread_t thread, hythread_tls_key_t key)
 Get a thread's thread local storage (TLS) value.
UDATA VMCALL hythread_get_priority (hythread_t thread)
 Return a thread's scheduling priority.
UDATA VMCALL hythread_get_flags (hythread_t thread, hythread_monitor_t *blocker)
 Return a thread's flags.
char *VMCALL hythread_monitor_get_name (hythread_monitor_t monitor)
 Return a monitor's name.
+


Function Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + +
UDATA VMCALL hythread_get_flags (hythread_t  thread,
hythread_monitor_t *  blocker 
)
+
+
+ +

+Return a thread's flags. +

+

Parameters:
+ + + +
[in] thread (non-NULL)
[in] blocker if non-NULL, will be set to the monitor on which the thread is blocked (if any)
+
+
Returns:
flags
+ +
+

+ +

+
+ + + + + + + + + +
UDATA VMCALL hythread_get_priority (hythread_t  thread  ) 
+
+
+ +

+Return a thread's scheduling priority. +

+

Parameters:
+ + +
[in] thread (non-NULL)
+
+
Returns:
scheduling priority
+
See also:
hythread_create, hythread_set_priority
+ +
+

+ +

+
+ + + + + + + + + +
char* VMCALL hythread_monitor_get_name (hythread_monitor_t  monitor  ) 
+
+
+ +

+Return a monitor's name. +

+

Parameters:
+ + +
[in] monitor (non-NULL)
+
+
Returns:
pointer to the monitor's name (may be NULL)
+
See also:
hythread_monitor_init_with_name
+ +
+

+ +

+
+ + + + + + + + + +
hythread_monitor_t VMCALL hythread_monitor_walk (hythread_monitor_t  monitor  ) 
+
+
+ +

+Walk all active monitors. +

+

Parameters:
+ + +
[in] monitor If NULL, the first monitor is returned and the monitor pool is locked (thread lib is globally locked)
+ If non-NULL, the next monitor is returned.
+
+
Returns:
a pointer to a monitor, or NULL if all monitors walked (and thread lib is globally unlocked).
+
Note:
As this is currently implemented, this must be called to walk ALL monitors. It can't be used to look for a specific monitor and then quit.
+ +
+

+ +

+
+ + + + + + + + + + + + + + + + + + +
void* VMCALL hythread_tls_get (hythread_t  thread,
hythread_tls_key_t  key 
)
+
+
+ +

+Get a thread's thread local storage (TLS) value. +

+

Parameters:
+ + + +
[in] thread a thread
[in] key key to have TLS value returned (value returned by hythread_tls_alloc)
+
+
Returns:
pointer to location of TLS or NULL on failure.
+ +
+

+


+
+ +

Genereated on Tue Dec 9 14:13:00 2008 by Doxygen.

+

(c) Copyright 2005, 2008 The Apache Software Foundation or its licensors, as applicable.

+
+
+ + Propchange: harmony/standard/site/docs/externals/vm_doc/html/hythreadinspect_8c.html ------------------------------------------------------------------------------ svn:eol-style = native Added: harmony/standard/site/docs/externals/vm_doc/html/hytime_8c.html URL: http://svn.apache.org/viewvc/harmony/standard/site/docs/externals/vm_doc/html/hytime_8c.html?rev=724734&view=auto ============================================================================== --- harmony/standard/site/docs/externals/vm_doc/html/hytime_8c.html (added) +++ harmony/standard/site/docs/externals/vm_doc/html/hytime_8c.html Tue Dec 9 07:03:45 2008 @@ -0,0 +1,336 @@ + + +Harmony Class Library Porting: modules/portlib/src/main/native/port/windows/hytime.c File Reference + + + + + +

modules/portlib/src/main/native/port/windows/hytime.c File Reference


Detailed Description

+Timer utilities. +

+ +

+#include <windows.h>
+#include "hyport.h"
+#include "portpriv.h"
+#include "hyportpg.h"
+ + + + + + + + + + + + + + + + + + + + + + + + + + + +

Functions

UDATA VMCALL hytime_msec_clock (struct HyPortLibrary *portLibrary)
 Query OS for timestamp.
UDATA VMCALL hytime_usec_clock (struct HyPortLibrary *portLibrary)
 Query OS for timestamp.
I_64 VMCALL hytime_current_time_millis (struct HyPortLibrary *portLibrary)
 Query OS for timestamp.
U_64 VMCALL hytime_hires_clock (struct HyPortLibrary *portLibrary)
 Query OS for timestamp.
U_64 VMCALL hytime_hires_frequency (struct HyPortLibrary *portLibrary)
 Query OS for clock frequency Retrieves the frequency of the high-resolution performance counter.
U_64 VMCALL hytime_hires_delta (struct HyPortLibrary *portLibrary, U_64 startTime, U_64 endTime, UDATA requiredResolution)
 Calculate time difference between two hires clock timer values hytime_hires_clock.
void VMCALL hytime_shutdown (struct HyPortLibrary *portLibrary)
 PortLibrary shutdown.
I_32 VMCALL hytime_startup (struct HyPortLibrary *portLibrary)
 PortLibrary startup.
+


Function Documentation

+ +
+
+ + + + + + + + + +
I_64 VMCALL hytime_current_time_millis (struct HyPortLibrary portLibrary  ) 
+
+
+ +

+Query OS for timestamp. +

+Retrieve the current value of system clock and convert to milliseconds since January 1st 1970.

+

Parameters:
+ + +
[in] portLibrary The port library.
+
+
Returns:
0 on failure, time value in milliseconds on success.
+ +
+

+ +

+
+ + + + + + + + + +
U_64 VMCALL hytime_hires_clock (struct HyPortLibrary portLibrary  ) 
+
+
+ +

+Query OS for timestamp. +

+Retrieve the current value of the high-resolution performance counter.

+

Parameters:
+ + +
[in] portLibrary The port library.
+
+
Returns:
0 on failure, time value on success.
+ +
+

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
U_64 VMCALL hytime_hires_delta (struct HyPortLibrary portLibrary,
U_64  startTime,
U_64  endTime,
UDATA  requiredResolution 
)
+
+
+ +

+Calculate time difference between two hires clock timer values hytime_hires_clock. +

+Given a start and end time determine how much time elapsed. Return the value as requested by the required resolution

+

Parameters:
+ + + + + +
[in] portLibrary The port library.
[in] startTime Timer value at start of timing interval
[in] endTime Timer value at end of timing interval
[in] requiredResolution Returned timer resolution as a fraction of a second. For example:
    +
  • 1 to report elapsed time in seconds
  • +
  • 1,000 to report elapsed time in milliseconds
  • +
  • 1,000,000 to report elapsed time in microseconds
  • +
+
+
+
Returns:
0 on failure, time difference on success.
+
Note:
helper macros are available for commonly requested resolution
    +
  • HYPORT_TIME_DELTA_IN_SECONDS return timer value in seconds.
  • +
  • HYPORT_TIME_DELTA_IN_MILLISECONDS return timer value in milliseconds.
  • +
  • HYPORT_TIME_DELTA_IN_MICROSECONDS return timer value in micoseconds.
  • +
  • HYPORT_TIME_DELTA_IN_NANOSECONDS return timer value in nanoseconds.
  • +
+
+ +
+

+ +

+
+ + + + + + + + + +
U_64 VMCALL hytime_hires_frequency (struct HyPortLibrary portLibrary  ) 
+
+
+ +

+Query OS for clock frequency Retrieves the frequency of the high-resolution performance counter. +

+

Parameters:
+ + +
[in] portLibrary The port library.
+
+
Returns:
0 on failure, number of ticks per second on success.
+ +
+

+ +

+
+ + + + + + + + + +
UDATA VMCALL hytime_msec_clock (struct HyPortLibrary portLibrary  ) 
+
+
+ +

+Query OS for timestamp. +

+Retrieve the current value of system clock and convert to milliseconds.

+

Parameters:
+ + +
[in] portLibrary The port library.
+
+
Returns:
0 on failure, time value in milliseconds on success.
+
Deprecated:
Use hytime_hires_clock and hytime_hires_delta
+ +
+

+ +

+
+ + + + + + + + + +
void VMCALL hytime_shutdown (struct HyPortLibrary portLibrary  ) 
+
+
+ +

+PortLibrary shutdown. +

+This function is called during shutdown of the portLibrary. Any resources that were created by hytime_startup should be destroyed here.

+

Parameters:
+ + +
[in] portLibrary The port library.
+
+
Note:
Most implementations will be empty.
+ +
+

+ +

+
+ + + + + + + + + +
I_32 VMCALL hytime_startup (struct HyPortLibrary portLibrary  ) 
+
+
+ +

+PortLibrary startup. +

+This function is called during startup of the portLibrary. Any resources that are required for the time operations may be created here. All resources created here should be destroyed in hytime_shutdown.

+

Parameters:
+ + +
[in] portLibrary The port library.
+
+
Returns:
0 on success, negative error code on failure. Error code values returned are
    +
  • HYPORT_ERROR_STARTUP_TIME
  • +
+
+
Note:
Most implementations will simply return success.
+ +
+

+ +

+
+ + + + + + + + + +
UDATA VMCALL hytime_usec_clock (struct HyPortLibrary portLibrary  ) 
+
+
+ +

+Query OS for timestamp. +

+Retrieve the current value of system clock and convert to microseconds.

+

Parameters:
+ + +
[in] portLibrary The port library.
+
+
Returns:
0 on failure, time value in microseconds on success.
+
Deprecated:
Use hytime_hires_clock and hytime_hires_delta
+ +
+

+


+
+ +

Genereated on Tue Dec 9 14:12:59 2008 by Doxygen.

+

(c) Copyright 2005, 2008 The Apache Software Foundation or its licensors, as applicable.

+
+
+ + Propchange: harmony/standard/site/docs/externals/vm_doc/html/hytime_8c.html ------------------------------------------------------------------------------ svn:eol-style = native Added: harmony/standard/site/docs/externals/vm_doc/html/hytlshelpers_8c.html URL: http://svn.apache.org/viewvc/harmony/standard/site/docs/externals/vm_doc/html/hytlshelpers_8c.html?rev=724734&view=auto ============================================================================== --- harmony/standard/site/docs/externals/vm_doc/html/hytlshelpers_8c.html (added) +++ harmony/standard/site/docs/externals/vm_doc/html/hytlshelpers_8c.html Tue Dec 9 07:03:45 2008 @@ -0,0 +1,73 @@ + + +Harmony Class Library Porting: modules/portlib/src/main/native/port/shared/hytlshelpers.c File Reference + + + + + +

modules/portlib/src/main/native/port/shared/hytlshelpers.c File Reference


Detailed Description

+Per Thread Buffer Support. +

+Per thread buffers are used to store information that is not sharable among the threads. For example when an OS system call fails the error code associated with that error is relevant to the thread that called the OS function; it has no meaning to any other thread.

+This file contains the functions supported by the port library for creating, accessing and destroying per thread buffers.

See also:
hyportptb.h for details on the per thread buffer structure.
+Only the function hyport_tls_free is available via the port library function table. The rest of the functions are helpers for the port library only. +

+#include <string.h>
+#include "hyport.h"
+#include "portpriv.h"
+#include "hythread.h"
+#include "hyportptb.h"
+ + + + + + +

Functions

void VMCALL hyport_tls_free (struct HyPortLibrary *portLibrary)
 Per Thread Buffer Support.
+


Function Documentation

+ +
+
+ + + + + + + + + +
void VMCALL hyport_tls_free (struct HyPortLibrary portLibrary  ) 
+
+
+ +

+Per Thread Buffer Support. +

+Free the per thread buffers.

+

Parameters:
+ + +
[in] portLibrary The port library.
+
+ +
+

+


+
+ +

Genereated on Tue Dec 9 14:12:59 2008 by Doxygen.

+

(c) Copyright 2005, 2008 The Apache Software Foundation or its licensors, as applicable.

+
+
+ + Propchange: harmony/standard/site/docs/externals/vm_doc/html/hytlshelpers_8c.html ------------------------------------------------------------------------------ svn:eol-style = native Added: harmony/standard/site/docs/externals/vm_doc/html/hytty_8c.html URL: http://svn.apache.org/viewvc/harmony/standard/site/docs/externals/vm_doc/html/hytty_8c.html?rev=724734&view=auto ============================================================================== --- harmony/standard/site/docs/externals/vm_doc/html/hytty_8c.html (added) +++ harmony/standard/site/docs/externals/vm_doc/html/hytty_8c.html Tue Dec 9 07:03:45 2008 @@ -0,0 +1,381 @@ + + +Harmony Class Library Porting: modules/portlib/src/main/native/port/windows/hytty.c File Reference + + + + + +

modules/portlib/src/main/native/port/windows/hytty.c File Reference


Detailed Description

+TTY output. +

+All VM output goes to stderr by default. These routines provide the helpers for such output. +

+#include <windows.h>
+#include <stdio.h>
+#include "hyport.h"
+#include "portpriv.h"
+#include "hyportpg.h"
+ + + + + + + + + + + + + + + + + + + + + + + + + + + +

Functions

I_32 VMCALL hytty_startup (struct HyPortLibrary *portLibrary)
 PortLibrary startup.
void VMCALL hytty_shutdown (struct HyPortLibrary *portLibrary)
 PortLibrary shutdown.
void VMCALL hytty_printf (struct HyPortLibrary *portLibrary, const char *format,...)
 Write characters to stderr.
IDATA VMCALL hytty_get_chars (struct HyPortLibrary *portLibrary, char *s, UDATA length)
 Read characters from stdin into buffer.
void VMCALL hytty_err_printf (struct HyPortLibrary *portLibrary, const char *format,...)
 Output message to stderr.
IDATA VMCALL hytty_available (struct HyPortLibrary *portLibrary)
 Determine the number of characters remaining to be read from stdin.
void VMCALL hytty_vprintf (struct HyPortLibrary *portLibrary, const char *format, va_list args)
 Output message to stderr.
void VMCALL hytty_err_vprintf (struct HyPortLibrary *portLibrary, const char *format, va_list args)
 Output message to stderr.
+


Function Documentation

+ +
+
+ + + + + + + + + +
IDATA VMCALL hytty_available (struct HyPortLibrary portLibrary  ) 
+
+
+ +

+Determine the number of characters remaining to be read from stdin. +

+

Parameters:
+ + +
[in] portLibrary The port library.
+
+
Returns:
number of characters remaining to be read.
+ +
+

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + +
void VMCALL hytty_err_printf (struct HyPortLibrary portLibrary,
const char *  format,
  ... 
)
+
+
+ +

+Output message to stderr. +

+

Parameters:
+ + + + +
[in] portLibrary The port library.
[in] format The format String.
[in] ... argument list.
+
+
Deprecated:
All output goes to stderr, use hytty_printf()
+ +
+

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + +
void VMCALL hytty_err_vprintf (struct HyPortLibrary portLibrary,
const char *  format,
va_list  args 
)
+
+
+ +

+Output message to stderr. +

+

Parameters:
+ + + + +
[in] portLibrary The port library.
[in] format The format String.
[in] args Variable argument list.
+
+
Deprecated:
All output goes to stderr, use hytty_vprintf()
+ +
+

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + +
IDATA VMCALL hytty_get_chars (struct HyPortLibrary portLibrary,
char *  s,
UDATA  length 
)
+
+
+ +

+Read characters from stdin into buffer. +

+

Parameters:
+ + + + +
[in] portLibrary The port library.
[out] s Buffer.
[in] length Size of buffer (s).
+
+
Returns:
The number of characters read, -1 on error.
+ +
+

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + +
void VMCALL hytty_printf (struct HyPortLibrary portLibrary,
const char *  format,
  ... 
)
+
+
+ +

+Write characters to stderr. +

+

Parameters:
+ + + + +
[in] portLibrary The port library.
[in] format The format string to be output.
[in] ... arguments for format.
+
+
Note:
Use hyfile_printf for stdout output.
+ +
+

+ +

+
+ + + + + + + + + +
void VMCALL hytty_shutdown (struct HyPortLibrary portLibrary  ) 
+
+
+ +

+PortLibrary shutdown. +

+This function is called during shutdown of the portLibrary. Any resources that were created by hytty_startup should be destroyed here.

+

Parameters:
+ + +
[in] portLibrary The port library.
+
+
Note:
Most implementations will be empty.
+ +
+

+ +

+
+ + + + + + + + + +
I_32 VMCALL hytty_startup (struct HyPortLibrary portLibrary  ) 
+
+
+ +

+PortLibrary startup. +

+This function is called during startup of the portLibrary. Any resources that are required for the TTY library operations may be created here. All resources created here should be destroyed in hytty_shutdown.

+

Parameters:
+ + +
[in] portLibrary The port library.
+
+
Returns:
0 on success, negative error code on failure. Error code values returned are
    +
  • HYPORT_ERROR_STARTUP_TTY
  • +
  • HYPORT_ERROR_STARTUP_TTY_HANDLE
  • +
  • HYPORT_ERROR_STARTUP_TTY_CONSOLE
  • +
+
+
Note:
Most implementations will simply return success.
+ +
+

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + +
void VMCALL hytty_vprintf (struct HyPortLibrary portLibrary,
const char *  format,
va_list  args 
)
+
+
+ +

+Output message to stderr. +

+

Parameters:
+ + + + +
[in] portLibrary The port library.
[in] format The format String.
[in] args Variable argument list.
+
+
Note:
Use hyfile_vprintf for stdout output.
+ +
+

+


+
+ +

Genereated on Tue Dec 9 14:12:59 2008 by Doxygen.

+

(c) Copyright 2005, 2008 The Apache Software Foundation or its licensors, as applicable.

+
+
+ + Propchange: harmony/standard/site/docs/externals/vm_doc/html/hytty_8c.html ------------------------------------------------------------------------------ svn:eol-style = native Added: harmony/standard/site/docs/externals/vm_doc/html/hyvmem_8c.html URL: http://svn.apache.org/viewvc/harmony/standard/site/docs/externals/vm_doc/html/hyvmem_8c.html?rev=724734&view=auto ============================================================================== --- harmony/standard/site/docs/externals/vm_doc/html/hyvmem_8c.html (added) +++ harmony/standard/site/docs/externals/vm_doc/html/hyvmem_8c.html Tue Dec 9 07:03:45 2008 @@ -0,0 +1,382 @@ + + +Harmony Class Library Porting: modules/portlib/src/main/native/port/windows/hyvmem.c File Reference + + + + + +

modules/portlib/src/main/native/port/windows/hyvmem.c File Reference


Detailed Description

+Virtual memory. +

+ +

+#include <windows.h>
+#include "hyport.h"
+#include "portpriv.h"
+#include "hyportpg.h"
+#include "ut_hyprt.h"
+ + + + + + + + + + + + + + + + + + + + + + + + +

Functions

void *VMCALL hyvmem_commit_memory (struct HyPortLibrary *portLibrary, void *address, UDATA byteAmount, struct HyPortVmemIdentifier *identifier)
 Commit memory in virtual address space.
IDATA VMCALL hyvmem_decommit_memory (struct HyPortLibrary *portLibrary, void *address, UDATA byteAmount, struct HyPortVmemIdentifier *identifier)
 Decommit memory in virtual address space.
I_32 VMCALL hyvmem_free_memory (struct HyPortLibrary *portLibrary, void *address, UDATA byteAmount, struct HyPortVmemIdentifier *identifier)
 Free memory in virtual address space.
void *VMCALL hyvmem_reserve_memory (struct HyPortLibrary *portLibrary, void *address, UDATA byteAmount, struct HyPortVmemIdentifier *identifier, UDATA mode, UDATA pageSize)
 Reserve memory in virtual address space.
void VMCALL hyvmem_shutdown (struct HyPortLibrary *portLibrary)
 PortLibrary shutdown.
I_32 VMCALL hyvmem_startup (struct HyPortLibrary *portLibrary)
 PortLibrary startup.
UDATA *VMCALL hyvmem_supported_page_sizes (struct HyPortLibrary *portLibrary)
 Determine the page sizes supported.
+


Function Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void* VMCALL hyvmem_commit_memory (struct HyPortLibrary portLibrary,
void *  address,
UDATA  byteAmount,
struct HyPortVmemIdentifier *  identifier 
)
+
+
+ +

+Commit memory in virtual address space. +

+

Parameters:
+ + + + + +
[in] portLibrary The port library.
[in] address The page aligned starting address of the memory to commit.
[in] byteAmount The number of bytes to commit.
[in] identifier Descriptor for virtual memory block.
+
+
Returns:
pointer to the allocated memory on success, NULL on failure.
+ +
+

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
IDATA VMCALL hyvmem_decommit_memory (struct HyPortLibrary portLibrary,
void *  address,
UDATA  byteAmount,
struct HyPortVmemIdentifier *  identifier 
)
+
+
+ +

+Decommit memory in virtual address space. +

+Decommits physical storage of the size specified starting at the address specified.

+

Parameters:
+ + + + + +
[in] portLibrary The port library.
[in] address The starting address of the memory to be decommitted.
[in] byteAmount The number of bytes to be decommitted.
[in] identifier Descriptor for virtual memory block.
+
+
Returns:
0 on success, non zero on failure.
+ +
+

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
I_32 VMCALL hyvmem_free_memory (struct HyPortLibrary portLibrary,
void *  address,
UDATA  byteAmount,
struct HyPortVmemIdentifier *  identifier 
)
+
+
+ +

+Free memory in virtual address space. +

+Frees physical storage of the size specified starting at the address specified.

+

Parameters:
+ + + + + +
[in] portLibrary The port library.
[in] address The starting address of the memory to be de-allocated.
[in] byteAmount The number of bytes to be allocated.
[in] identifier Descriptor for virtual memory block.
+
+
Returns:
0 on success, non zero on failure.
+ +
+

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void* VMCALL hyvmem_reserve_memory (struct HyPortLibrary portLibrary,
void *  address,
UDATA  byteAmount,
struct HyPortVmemIdentifier *  identifier,
UDATA  mode,
UDATA  pageSize 
)
+
+
+ +

+Reserve memory in virtual address space. +

+Reserves a range of virtual address space without allocating any actual physical storage. The memory is not available for use until committed hyvmem_commit_memory. The memory may not be used by other memory allocation routines until it is explicitly released.

+

Parameters:
+ + + + + + + +
[in] portLibrary The port library.
[in] address The starting address of the memory to be reserved.
[in] byteAmount The number of bytes to be reserved.
[in] identifier Descriptor for virtual memory block.
[in] mode Bitmap indicating how memory is to be reserved. Expected values combination of:
    +
  • HYPORT_VMEM_MEMORY_MODE_READ memory is readable
  • +
  • HYPORT_VMEM_MEMORY_MODE_WRITE memory is writable
  • +
  • HYPORT_VMEM_MEMORY_MODE_EXECUTE memory is executable
  • +
  • HYPORT_VMEM_MEMORY_MODE_COMMIT commits memory as part of the reserve
  • +
+
[in] pageSize Size of the page requested, a value returned by hyvmem_supported_page_sizes, or the constant HYPORT_VMEM_PAGE_SIZE_DEFAULT for the system default page size.
+
+
Returns:
pointer to the reserved memory on success, NULL on failure.
+ +
+

+ +

+
+ + + + + + + + + +
void VMCALL hyvmem_shutdown (struct HyPortLibrary portLibrary  ) 
+
+
+ +

+PortLibrary shutdown. +

+This function is called during shutdown of the portLibrary. Any resources that were created by hyvmem_startup should be destroyed here.

+

Parameters:
+ + +
[in] portLibrary The port library.
+
+
Note:
Most implementations will be empty.
+ +
+

+ +

+
+ + + + + + + + + +
I_32 VMCALL hyvmem_startup (struct HyPortLibrary portLibrary  ) 
+
+
+ +

+PortLibrary startup. +

+This function is called during startup of the portLibrary. Any resources that are required for the virtual memory operations may be created here. All resources created here should be destroyed in hyvmem_shutdown.

+

Parameters:
+ + +
[in] portLibrary The port library.
+
+
Returns:
0 on success, negative error code on failure. Error code values returned are
    +
  • HYPORT_ERROR_STARTUP_VMEM
  • +
+
+
Note:
Most implementations will simply return success.
+ +
+

+ +

+
+ + + + + + + + + +
UDATA* VMCALL hyvmem_supported_page_sizes (struct HyPortLibrary portLibrary  ) 
+
+
+ +

+Determine the page sizes supported. +

+

Parameters:
+ + +
[in] portLibrary The port library.
+
+
Returns:
A 0 terminated array of supported page sizes. The first entry is the default page size, other entries are the large page sizes supported.
+ +
+

+


+
+ +

Genereated on Tue Dec 9 14:13:00 2008 by Doxygen.

+

(c) Copyright 2005, 2008 The Apache Software Foundation or its licensors, as applicable.

+
+
+ + Propchange: harmony/standard/site/docs/externals/vm_doc/html/hyvmem_8c.html ------------------------------------------------------------------------------ svn:eol-style = native Added: harmony/standard/site/docs/externals/vm_doc/html/hyvmls_8h.html URL: http://svn.apache.org/viewvc/harmony/standard/site/docs/externals/vm_doc/html/hyvmls_8h.html?rev=724734&view=auto ============================================================================== --- harmony/standard/site/docs/externals/vm_doc/html/hyvmls_8h.html (added) +++ harmony/standard/site/docs/externals/vm_doc/html/hyvmls_8h.html Tue Dec 9 07:03:45 2008 @@ -0,0 +1,39 @@ + + +Harmony Class Library Porting: modules/luni/src/main/native/include/shared/hyvmls.h File Reference + + + + + +

modules/luni/src/main/native/include/shared/hyvmls.h File Reference


Detailed Description

+VM Local Storage Header. +

+ +

+#include "hycomp.h"
+#include "jni.h"
+ + + + + + +

Data Structures

struct  HyVMLSFunctionTable
 The VM local storage function table. More...
+


+
+ +

Genereated on Tue Dec 9 14:12:59 2008 by Doxygen.

+

(c) Copyright 2005, 2008 The Apache Software Foundation or its licensors, as applicable.

+
+
+ + Propchange: harmony/standard/site/docs/externals/vm_doc/html/hyvmls_8h.html ------------------------------------------------------------------------------ svn:eol-style = native Added: harmony/standard/site/docs/externals/vm_doc/html/index.html URL: http://svn.apache.org/viewvc/harmony/standard/site/docs/externals/vm_doc/html/index.html?rev=724734&view=auto ============================================================================== --- harmony/standard/site/docs/externals/vm_doc/html/index.html (added) +++ harmony/standard/site/docs/externals/vm_doc/html/index.html Tue Dec 9 07:03:45 2008 @@ -0,0 +1,74 @@ + + +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/bin. 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. +
+
+
+ +

Genereated on Tue Dec 9 14:12:59 2008 by Doxygen.

+

(c) Copyright 2005, 2008 The Apache Software Foundation or its licensors, as applicable.

+
+
+ + Propchange: harmony/standard/site/docs/externals/vm_doc/html/index.html ------------------------------------------------------------------------------ svn:eol-style = native