You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by ge...@apache.org on 2005/12/01 07:04:00 UTC

svn commit: r350181 [37/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...

Added: incubator/harmony/enhanced/trunk/sandbox/contribs/ibm_core/doc/vm_doc/html/hygp_8c.html
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/trunk/sandbox/contribs/ibm_core/doc/vm_doc/html/hygp_8c.html?rev=350181&view=auto
==============================================================================
--- incubator/harmony/enhanced/trunk/sandbox/contribs/ibm_core/doc/vm_doc/html/hygp_8c.html (added)
+++ incubator/harmony/enhanced/trunk/sandbox/contribs/ibm_core/doc/vm_doc/html/hygp_8c.html Wed Nov 30 21:29:27 2005
@@ -0,0 +1,369 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
+<title>Harmony Class Library Porting: native-src/win.IA32/port/hygp.c File Reference</title>
+<link href="hydoxygen.css" rel="stylesheet" type="text/css">
+</head><body>
+<!-- Generated by Doxygen 1.4.4 -->
+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="hierarchy.html">Class&nbsp;Hierarchy</a> | <a class="qindex" href="annotated.html">Data&nbsp;Structures</a> | <a class="qindex" href="dirs.html">Directories</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Data&nbsp;Fields</a> | <a class="qindex" href="globals.html">Globals</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>
+<div class="nav">
+<a class="el" href="dir_000000.html">native-src</a>&nbsp;&raquo&nbsp;<a class="el" href="dir_000001.html">win.IA32</a>&nbsp;&raquo&nbsp;<a class="el" href="dir_000007.html">port</a></div>
+<h1>hygp.c File Reference</h1><hr><a name="_details"></a><h2>Detailed Description</h2>
+Provides platform-neutral signal handling functions. 
+<p>
+The <a class="el" href="hygp_8c.html#a1">hygp_register_handler</a> function is partially dependent on internal VM structures, and must be called with NULL as a third (userData) parameter. <br>
+<br>
+
+<p>
+<code>#include &quot;<a class="el" href="hyport_8h.html">hyport.h</a>&quot;</code><br>
+<code>#include &quot;hycomp.h&quot;</code><br>
+<code>#include &quot;gp.h&quot;</code><br>
+<table border="0" cellpadding="0" cellspacing="0">
+<tr><td></td></tr>
+<tr><td colspan="2"><br><h2>Functions</h2></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">UDATA VMCALL&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="hygp_8c.html#a0">hygp_protect</a> (struct <a class="el" href="structHyPortLibrary.html">HyPortLibrary</a> *portLibrary, protected_fn fn, void *arg)</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Kicks off the new thread by calling the function provided in protected_fn fn.  <a href="#a0"></a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">void VMCALL&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="hygp_8c.html#a1">hygp_register_handler</a> (struct <a class="el" href="structHyPortLibrary.html">HyPortLibrary</a> *portLibrary, handler_fn fn, void *aUserData)</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Sets the function that is responsible for preserving/outputting the state of the vm and initiating a graceful shutdown resulting from a gp.  <a href="#a1"></a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">U_32 VMCALL&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="hygp_8c.html#a2">hygp_info</a> (struct <a class="el" href="structHyPortLibrary.html">HyPortLibrary</a> *portLibrary, void *info, U_32 category, I_32 index, const char **name, void **value)</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Provides the name and value, specified by category/index of the gp information in info.  <a href="#a2"></a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">U_32 VMCALL&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="hygp_8c.html#a3">hygp_info_count</a> (struct <a class="el" href="structHyPortLibrary.html">HyPortLibrary</a> *portLibrary, void *info, U_32 category)</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns the number of items that exist in the category specified, or zero if the category is undefined.  <a href="#a3"></a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">void VMCALL&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="hygp_8c.html#a4">hygp_shutdown</a> (struct <a class="el" href="structHyPortLibrary.html">HyPortLibrary</a> *portLibrary)</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">PortLibrary shutdown.  <a href="#a4"></a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">I_32 VMCALL&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="hygp_8c.html#a5">hygp_startup</a> (struct <a class="el" href="structHyPortLibrary.html">HyPortLibrary</a> *portLibrary)</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">PortLibrary startup.  <a href="#a5"></a><br></td></tr>
+</table>
+<hr><h2>Function Documentation</h2>
+<a class="anchor" name="a2"></a><!-- doxytag: member="hygp.c::hygp_info" ref="a2" args="(struct HyPortLibrary *portLibrary, void *info, U_32 category, I_32 index, const char **name, void **value)" --><p>
+<table class="mdTable" cellpadding="2" cellspacing="0">
+  <tr>
+    <td class="mdRow">
+      <table cellpadding="0" cellspacing="0" border="0">
+        <tr>
+          <td class="md" nowrap valign="top">U_32 VMCALL hygp_info           </td>
+          <td class="md" valign="top">(&nbsp;</td>
+          <td class="md" nowrap valign="top">struct <a class="el" href="structHyPortLibrary.html">HyPortLibrary</a> *&nbsp;</td>
+          <td class="mdname" nowrap> <em>portLibrary</em>, </td>
+        </tr>
+        <tr>
+          <td class="md" nowrap align="right"></td>
+          <td class="md"></td>
+          <td class="md" nowrap>void *&nbsp;</td>
+          <td class="mdname" nowrap> <em>info</em>, </td>
+        </tr>
+        <tr>
+          <td class="md" nowrap align="right"></td>
+          <td class="md"></td>
+          <td class="md" nowrap>U_32&nbsp;</td>
+          <td class="mdname" nowrap> <em>category</em>, </td>
+        </tr>
+        <tr>
+          <td class="md" nowrap align="right"></td>
+          <td class="md"></td>
+          <td class="md" nowrap>I_32&nbsp;</td>
+          <td class="mdname" nowrap> <em>index</em>, </td>
+        </tr>
+        <tr>
+          <td class="md" nowrap align="right"></td>
+          <td class="md"></td>
+          <td class="md" nowrap>const char **&nbsp;</td>
+          <td class="mdname" nowrap> <em>name</em>, </td>
+        </tr>
+        <tr>
+          <td class="md" nowrap align="right"></td>
+          <td class="md"></td>
+          <td class="md" nowrap>void **&nbsp;</td>
+          <td class="mdname" nowrap> <em>value</em></td>
+        </tr>
+        <tr>
+          <td class="md"></td>
+          <td class="md">)&nbsp;</td>
+          <td class="md" colspan="2"></td>
+        </tr>
+      </table>
+    </td>
+  </tr>
+</table>
+<table cellspacing="5" cellpadding="0" border="0">
+  <tr>
+    <td>
+      &nbsp;
+    </td>
+    <td>
+
+<p>
+Provides the name and value, specified by category/index of the gp information in info. 
+<p>
+Returns the kind of information found at category/index specified, or undefined if the category/index are invalid. The number of items in the category specified must equal the count <a class="el" href="hygp_8c.html#a3">hygp_info_count</a> returns for that category.<p>
+<dl compact><dt><b>Parameters:</b></dt><dd>
+  <table border="0" cellspacing="2" cellpadding="0">
+    <tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>portLibrary</em>&nbsp;</td><td>The port library </td></tr>
+    <tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>info</em>&nbsp;</td><td>struct containing all available signal information. Normally includes register values, name of module where crash occured and its base address. </td></tr>
+    <tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>category</em>&nbsp;</td><td>the category of signal information that you are querying. </td></tr>
+    <tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>index</em>&nbsp;</td><td>the index of the item in the specified category. The number of items for each category are defined in the sourceTemplate. </td></tr>
+    <tr><td valign="top"><tt>[out]</tt>&nbsp;</td><td valign="top"><em>name</em>&nbsp;</td><td>the name of the item at the specified index. </td></tr>
+    <tr><td valign="top"><tt>[out]</tt>&nbsp;</td><td valign="top"><em>value</em>&nbsp;</td><td>the value of the item at the specified index</td></tr>
+  </table>
+</dl>
+<dl compact><dt><b>Returns:</b></dt><dd>the kind of info at the specified index. For example, this allows the caller to determine whether the item placed in **value corresponds to a 32/64-bit integer or a pointer to a string.</dd></dl>
+<dl compact><dt><b>Note:</b></dt><dd>The program counter and module name also have negative indexes as defined by HYGP_CONTROL_PC and HYGP_MODULE_NAME respectively. <p>
+Above allows the handler function registered in <a class="el" href="hygp_8c.html#a1">hygp_register_handler</a> to distinguish (and use) them from the other gp items. <p>
+The caller is responsible for allocating and freeing any buffers used by **name, **value.</dd></dl>
+    </td>
+  </tr>
+</table>
+<a class="anchor" name="a3"></a><!-- doxytag: member="hygp.c::hygp_info_count" ref="a3" args="(struct HyPortLibrary *portLibrary, void *info, U_32 category)" --><p>
+<table class="mdTable" cellpadding="2" cellspacing="0">
+  <tr>
+    <td class="mdRow">
+      <table cellpadding="0" cellspacing="0" border="0">
+        <tr>
+          <td class="md" nowrap valign="top">U_32 VMCALL hygp_info_count           </td>
+          <td class="md" valign="top">(&nbsp;</td>
+          <td class="md" nowrap valign="top">struct <a class="el" href="structHyPortLibrary.html">HyPortLibrary</a> *&nbsp;</td>
+          <td class="mdname" nowrap> <em>portLibrary</em>, </td>
+        </tr>
+        <tr>
+          <td class="md" nowrap align="right"></td>
+          <td class="md"></td>
+          <td class="md" nowrap>void *&nbsp;</td>
+          <td class="mdname" nowrap> <em>info</em>, </td>
+        </tr>
+        <tr>
+          <td class="md" nowrap align="right"></td>
+          <td class="md"></td>
+          <td class="md" nowrap>U_32&nbsp;</td>
+          <td class="mdname" nowrap> <em>category</em></td>
+        </tr>
+        <tr>
+          <td class="md"></td>
+          <td class="md">)&nbsp;</td>
+          <td class="md" colspan="2"></td>
+        </tr>
+      </table>
+    </td>
+  </tr>
+</table>
+<table cellspacing="5" cellpadding="0" border="0">
+  <tr>
+    <td>
+      &nbsp;
+    </td>
+    <td>
+
+<p>
+Returns the number of items that exist in the category specified, or zero if the category is undefined. 
+<p>
+<dl compact><dt><b>Parameters:</b></dt><dd>
+  <table border="0" cellspacing="2" cellpadding="0">
+    <tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>portLibrary</em>&nbsp;</td><td>The port library </td></tr>
+    <tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>info</em>&nbsp;</td><td>struct containing all available signal information. Normally includes register values, name of module where crash occured and its base address. </td></tr>
+    <tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>category</em>&nbsp;</td><td>the category in which we want to find the number of items that exist.</td></tr>
+  </table>
+</dl>
+<dl compact><dt><b>Note:</b></dt><dd>Return value must agree with the number of items that <a class="el" href="hygp_8c.html#a2">hygp_info</a> makes available for the category specified.</dd></dl>
+    </td>
+  </tr>
+</table>
+<a class="anchor" name="a0"></a><!-- doxytag: member="hygp.c::hygp_protect" ref="a0" args="(struct HyPortLibrary *portLibrary, protected_fn fn, void *arg)" --><p>
+<table class="mdTable" cellpadding="2" cellspacing="0">
+  <tr>
+    <td class="mdRow">
+      <table cellpadding="0" cellspacing="0" border="0">
+        <tr>
+          <td class="md" nowrap valign="top">UDATA VMCALL hygp_protect           </td>
+          <td class="md" valign="top">(&nbsp;</td>
+          <td class="md" nowrap valign="top">struct <a class="el" href="structHyPortLibrary.html">HyPortLibrary</a> *&nbsp;</td>
+          <td class="mdname" nowrap> <em>portLibrary</em>, </td>
+        </tr>
+        <tr>
+          <td class="md" nowrap align="right"></td>
+          <td class="md"></td>
+          <td class="md" nowrap>protected_fn&nbsp;</td>
+          <td class="mdname" nowrap> <em>fn</em>, </td>
+        </tr>
+        <tr>
+          <td class="md" nowrap align="right"></td>
+          <td class="md"></td>
+          <td class="md" nowrap>void *&nbsp;</td>
+          <td class="mdname" nowrap> <em>arg</em></td>
+        </tr>
+        <tr>
+          <td class="md"></td>
+          <td class="md">)&nbsp;</td>
+          <td class="md" colspan="2"></td>
+        </tr>
+      </table>
+    </td>
+  </tr>
+</table>
+<table cellspacing="5" cellpadding="0" border="0">
+  <tr>
+    <td>
+      &nbsp;
+    </td>
+    <td>
+
+<p>
+Kicks off the new thread by calling the function provided in protected_fn fn. 
+<p>
+All threads spawned by the vm start here and all OS signals that will be handled by fn must be registered to the OS here. Upon receiving a signal from the OS, fn is responsible for calling the function specified in <a class="el" href="hygp_8c.html#a1">hygp_register_handler</a> if it is determined that a shutdown is required.<p>
+<dl compact><dt><b>Parameters:</b></dt><dd>
+  <table border="0" cellspacing="2" cellpadding="0">
+    <tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>portLibrary</em>&nbsp;</td><td>The port library </td></tr>
+    <tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>fn</em>&nbsp;</td><td>the function that will be used to kick off the thread </td></tr>
+    <tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>arg</em>&nbsp;</td><td>arguments to protected_fn fn</td></tr>
+  </table>
+</dl>
+<dl compact><dt><b>Returns:</b></dt><dd>the return value of the function provided in fn</dd></dl>
+<dl compact><dt><b>Note:</b></dt><dd>it is a good idea to save the portLibrary in case a registered exception handler cannot be found</dd></dl>
+    </td>
+  </tr>
+</table>
+<a class="anchor" name="a1"></a><!-- doxytag: member="hygp.c::hygp_register_handler" ref="a1" args="(struct HyPortLibrary *portLibrary, handler_fn fn, void *aUserData)" --><p>
+<table class="mdTable" cellpadding="2" cellspacing="0">
+  <tr>
+    <td class="mdRow">
+      <table cellpadding="0" cellspacing="0" border="0">
+        <tr>
+          <td class="md" nowrap valign="top">void VMCALL hygp_register_handler           </td>
+          <td class="md" valign="top">(&nbsp;</td>
+          <td class="md" nowrap valign="top">struct <a class="el" href="structHyPortLibrary.html">HyPortLibrary</a> *&nbsp;</td>
+          <td class="mdname" nowrap> <em>portLibrary</em>, </td>
+        </tr>
+        <tr>
+          <td class="md" nowrap align="right"></td>
+          <td class="md"></td>
+          <td class="md" nowrap>handler_fn&nbsp;</td>
+          <td class="mdname" nowrap> <em>fn</em>, </td>
+        </tr>
+        <tr>
+          <td class="md" nowrap align="right"></td>
+          <td class="md"></td>
+          <td class="md" nowrap>void *&nbsp;</td>
+          <td class="mdname" nowrap> <em>aUserData</em></td>
+        </tr>
+        <tr>
+          <td class="md"></td>
+          <td class="md">)&nbsp;</td>
+          <td class="md" colspan="2"></td>
+        </tr>
+      </table>
+    </td>
+  </tr>
+</table>
+<table cellspacing="5" cellpadding="0" border="0">
+  <tr>
+    <td>
+      &nbsp;
+    </td>
+    <td>
+
+<p>
+Sets the function that is responsible for preserving/outputting the state of the vm and initiating a graceful shutdown resulting from a gp. 
+<p>
+<dl compact><dt><b>Parameters:</b></dt><dd>
+  <table border="0" cellspacing="2" cellpadding="0">
+    <tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>portLibrary</em>&nbsp;</td><td>The port library </td></tr>
+    <tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>fn</em>&nbsp;</td><td>function responsible for preserving/outputting the state of the vm and initiating a graceful shutdown resulting from a gp. </td></tr>
+    <tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>aUserData</em>&nbsp;</td><td>The HyJavaVM or NULL for non-HY consumers.</td></tr>
+  </table>
+</dl>
+<dl compact><dt><b>Note:</b></dt><dd>vmGPHandler in gphandle.c is currently the only function used for handling gps. <p>
+fn is not called by the OS but by the gp handler function specified in the call to <a class="el" href="hygp_8c.html#a0">hygp_protect</a> gp module <p>
+above occurs after the OS has passed a signal along to us and it is determined that a shutdown is required.</dd></dl>
+    </td>
+  </tr>
+</table>
+<a class="anchor" name="a4"></a><!-- doxytag: member="hygp.c::hygp_shutdown" ref="a4" args="(struct HyPortLibrary *portLibrary)" --><p>
+<table class="mdTable" cellpadding="2" cellspacing="0">
+  <tr>
+    <td class="mdRow">
+      <table cellpadding="0" cellspacing="0" border="0">
+        <tr>
+          <td class="md" nowrap valign="top">void VMCALL hygp_shutdown           </td>
+          <td class="md" valign="top">(&nbsp;</td>
+          <td class="md" nowrap valign="top">struct <a class="el" href="structHyPortLibrary.html">HyPortLibrary</a> *&nbsp;</td>
+          <td class="mdname1" valign="top" nowrap> <em>portLibrary</em>          </td>
+          <td class="md" valign="top">&nbsp;)&nbsp;</td>
+          <td class="md" nowrap></td>
+        </tr>
+      </table>
+    </td>
+  </tr>
+</table>
+<table cellspacing="5" cellpadding="0" border="0">
+  <tr>
+    <td>
+      &nbsp;
+    </td>
+    <td>
+
+<p>
+PortLibrary shutdown. 
+<p>
+This function is called during shutdown of the portLibrary. Any resources that were created by <a class="el" href="hygp_8c.html#a5">hygp_startup</a> should be destroyed here.<p>
+<dl compact><dt><b>Parameters:</b></dt><dd>
+  <table border="0" cellspacing="2" cellpadding="0">
+    <tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>portLibrary</em>&nbsp;</td><td>The port library</td></tr>
+  </table>
+</dl>
+<dl compact><dt><b>Note:</b></dt><dd>Most implementations will be empty.</dd></dl>
+    </td>
+  </tr>
+</table>
+<a class="anchor" name="a5"></a><!-- doxytag: member="hygp.c::hygp_startup" ref="a5" args="(struct HyPortLibrary *portLibrary)" --><p>
+<table class="mdTable" cellpadding="2" cellspacing="0">
+  <tr>
+    <td class="mdRow">
+      <table cellpadding="0" cellspacing="0" border="0">
+        <tr>
+          <td class="md" nowrap valign="top">I_32 VMCALL hygp_startup           </td>
+          <td class="md" valign="top">(&nbsp;</td>
+          <td class="md" nowrap valign="top">struct <a class="el" href="structHyPortLibrary.html">HyPortLibrary</a> *&nbsp;</td>
+          <td class="mdname1" valign="top" nowrap> <em>portLibrary</em>          </td>
+          <td class="md" valign="top">&nbsp;)&nbsp;</td>
+          <td class="md" nowrap></td>
+        </tr>
+      </table>
+    </td>
+  </tr>
+</table>
+<table cellspacing="5" cellpadding="0" border="0">
+  <tr>
+    <td>
+      &nbsp;
+    </td>
+    <td>
+
+<p>
+PortLibrary startup. 
+<p>
+This function is called during startup of the portLibrary. Any resources that are required for the shared library operation may be created here. All resources created here should be destroyed in <a class="el" href="hygp_8c.html#a4">hygp_shutdown</a>.<p>
+<dl compact><dt><b>Parameters:</b></dt><dd>
+  <table border="0" cellspacing="2" cellpadding="0">
+    <tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>portLibrary</em>&nbsp;</td><td>The port library</td></tr>
+  </table>
+</dl>
+<dl compact><dt><b>Returns:</b></dt><dd>0 on success, negative error code on failure. Error code values returned are <ul>
+<li>HYPORT_ERROR_STARTUP_GP</li>
+</ul>
+</dd></dl>
+<dl compact><dt><b>Note:</b></dt><dd>Most implementations will simply return success.</dd></dl>
+    </td>
+  </tr>
+</table>
+<hr size="1">
+<address style="text-align: center;">
+  <small>
+    (c) Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
+  </small>
+</address>
+</body>
+</html>

Added: incubator/harmony/enhanced/trunk/sandbox/contribs/ibm_core/doc/vm_doc/html/hyipcmutex_8c.html
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/trunk/sandbox/contribs/ibm_core/doc/vm_doc/html/hyipcmutex_8c.html?rev=350181&view=auto
==============================================================================
--- incubator/harmony/enhanced/trunk/sandbox/contribs/ibm_core/doc/vm_doc/html/hyipcmutex_8c.html (added)
+++ incubator/harmony/enhanced/trunk/sandbox/contribs/ibm_core/doc/vm_doc/html/hyipcmutex_8c.html Wed Nov 30 21:29:27 2005
@@ -0,0 +1,215 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
+<title>Harmony Class Library Porting: native-src/win.IA32/port/hyipcmutex.c File Reference</title>
+<link href="hydoxygen.css" rel="stylesheet" type="text/css">
+</head><body>
+<!-- Generated by Doxygen 1.4.4 -->
+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="hierarchy.html">Class&nbsp;Hierarchy</a> | <a class="qindex" href="annotated.html">Data&nbsp;Structures</a> | <a class="qindex" href="dirs.html">Directories</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Data&nbsp;Fields</a> | <a class="qindex" href="globals.html">Globals</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>
+<div class="nav">
+<a class="el" href="dir_000000.html">native-src</a>&nbsp;&raquo&nbsp;<a class="el" href="dir_000001.html">win.IA32</a>&nbsp;&raquo&nbsp;<a class="el" href="dir_000007.html">port</a></div>
+<h1>hyipcmutex.c File Reference</h1><hr><a name="_details"></a><h2>Detailed Description</h2>
+Shared Resource Mutex. 
+<p>
+The HYIPCMutex is used to protect a shared resource from simultaneous access by processes or threads executing in the same or different VMs. Each process/thread must request and wait for the ownership of the shared resource before it can use that resource. It must also release the ownership of the resource as soon as it has finished using it so that other processes competing for the same resource are not delayed.
+<p>
+<code>#include &lt;windows.h&gt;</code><br>
+<code>#include &quot;<a class="el" href="hyport_8h.html">hyport.h</a>&quot;</code><br>
+<table border="0" cellpadding="0" cellspacing="0">
+<tr><td></td></tr>
+<tr><td colspan="2"><br><h2>Functions</h2></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">I_32 VMCALL&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="hyipcmutex_8c.html#a6">hyipcmutex_acquire</a> (struct <a class="el" href="structHyPortLibrary.html">HyPortLibrary</a> *portLibrary, const char *name)</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Acquires a named mutex for the calling process.  <a href="#a6"></a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">I_32 VMCALL&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="hyipcmutex_8c.html#a7">hyipcmutex_release</a> (struct <a class="el" href="structHyPortLibrary.html">HyPortLibrary</a> *portLibrary, const char *name)</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Releases a named Mutex from the calling process.  <a href="#a7"></a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">void VMCALL&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="hyipcmutex_8c.html#a8">hyipcmutex_shutdown</a> (struct <a class="el" href="structHyPortLibrary.html">HyPortLibrary</a> *portLibrary)</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">PortLibrary shutdown.  <a href="#a8"></a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">I_32 VMCALL&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="hyipcmutex_8c.html#a9">hyipcmutex_startup</a> (struct <a class="el" href="structHyPortLibrary.html">HyPortLibrary</a> *portLibrary)</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">PortLibrary startup.  <a href="#a9"></a><br></td></tr>
+</table>
+<hr><h2>Function Documentation</h2>
+<a class="anchor" name="a6"></a><!-- doxytag: member="hyipcmutex.c::hyipcmutex_acquire" ref="a6" args="(struct HyPortLibrary *portLibrary, const char *name)" --><p>
+<table class="mdTable" cellpadding="2" cellspacing="0">
+  <tr>
+    <td class="mdRow">
+      <table cellpadding="0" cellspacing="0" border="0">
+        <tr>
+          <td class="md" nowrap valign="top">I_32 VMCALL hyipcmutex_acquire           </td>
+          <td class="md" valign="top">(&nbsp;</td>
+          <td class="md" nowrap valign="top">struct <a class="el" href="structHyPortLibrary.html">HyPortLibrary</a> *&nbsp;</td>
+          <td class="mdname" nowrap> <em>portLibrary</em>, </td>
+        </tr>
+        <tr>
+          <td class="md" nowrap align="right"></td>
+          <td class="md"></td>
+          <td class="md" nowrap>const char *&nbsp;</td>
+          <td class="mdname" nowrap> <em>name</em></td>
+        </tr>
+        <tr>
+          <td class="md"></td>
+          <td class="md">)&nbsp;</td>
+          <td class="md" colspan="2"></td>
+        </tr>
+      </table>
+    </td>
+  </tr>
+</table>
+<table cellspacing="5" cellpadding="0" border="0">
+  <tr>
+    <td>
+      &nbsp;
+    </td>
+    <td>
+
+<p>
+Acquires a named mutex for the calling process. 
+<p>
+If a Mutex with the same Name already exists, the function opens the existing Mutex and tries to lock it. If another process already has the Mutex locked, the function will block indefinetely. If there is no Mutex with the same Name, the function will create it and lock it for the calling process of this function.<p>
+<dl compact><dt><b>Parameters:</b></dt><dd>
+  <table border="0" cellspacing="2" cellpadding="0">
+    <tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>portLibrary</em>&nbsp;</td><td>The port library </td></tr>
+    <tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>name</em>&nbsp;</td><td>Mutex to be acquired</td></tr>
+  </table>
+</dl>
+<dl compact><dt><b>Returns:</b></dt><dd>0 on success, -1 on error.</dd></dl>
+<dl compact><dt><b>Note:</b></dt><dd>The Mutex must be explicitly released by calling the <a class="el" href="hyipcmutex_8c.html#a7">hyipcmutex_release</a> function as soon as the lock is no longer required.</dd></dl>
+    </td>
+  </tr>
+</table>
+<a class="anchor" name="a7"></a><!-- doxytag: member="hyipcmutex.c::hyipcmutex_release" ref="a7" args="(struct HyPortLibrary *portLibrary, const char *name)" --><p>
+<table class="mdTable" cellpadding="2" cellspacing="0">
+  <tr>
+    <td class="mdRow">
+      <table cellpadding="0" cellspacing="0" border="0">
+        <tr>
+          <td class="md" nowrap valign="top">I_32 VMCALL hyipcmutex_release           </td>
+          <td class="md" valign="top">(&nbsp;</td>
+          <td class="md" nowrap valign="top">struct <a class="el" href="structHyPortLibrary.html">HyPortLibrary</a> *&nbsp;</td>
+          <td class="mdname" nowrap> <em>portLibrary</em>, </td>
+        </tr>
+        <tr>
+          <td class="md" nowrap align="right"></td>
+          <td class="md"></td>
+          <td class="md" nowrap>const char *&nbsp;</td>
+          <td class="mdname" nowrap> <em>name</em></td>
+        </tr>
+        <tr>
+          <td class="md"></td>
+          <td class="md">)&nbsp;</td>
+          <td class="md" colspan="2"></td>
+        </tr>
+      </table>
+    </td>
+  </tr>
+</table>
+<table cellspacing="5" cellpadding="0" border="0">
+  <tr>
+    <td>
+      &nbsp;
+    </td>
+    <td>
+
+<p>
+Releases a named Mutex from the calling process. 
+<p>
+If a Mutex with the same Name already exists, the function opens the existing Mutex and tries to unlock it. This function will fail if a Mutex with the given Name is not found or if the Mutex cannot be unlocked.<p>
+<dl compact><dt><b>Parameters:</b></dt><dd>
+  <table border="0" cellspacing="2" cellpadding="0">
+    <tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>portLibrary</em>&nbsp;</td><td>The port library </td></tr>
+    <tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>name</em>&nbsp;</td><td>Mutex to be released.</td></tr>
+  </table>
+</dl>
+<dl compact><dt><b>Returns:</b></dt><dd>0 on success, -1 on error.</dd></dl>
+<dl compact><dt><b>Note:</b></dt><dd>Callers of this function must have called the function <a class="el" href="hyipcmutex_8c.html#a6">hyipcmutex_acquire</a> prior to calling this function.</dd></dl>
+    </td>
+  </tr>
+</table>
+<a class="anchor" name="a8"></a><!-- doxytag: member="hyipcmutex.c::hyipcmutex_shutdown" ref="a8" args="(struct HyPortLibrary *portLibrary)" --><p>
+<table class="mdTable" cellpadding="2" cellspacing="0">
+  <tr>
+    <td class="mdRow">
+      <table cellpadding="0" cellspacing="0" border="0">
+        <tr>
+          <td class="md" nowrap valign="top">void VMCALL hyipcmutex_shutdown           </td>
+          <td class="md" valign="top">(&nbsp;</td>
+          <td class="md" nowrap valign="top">struct <a class="el" href="structHyPortLibrary.html">HyPortLibrary</a> *&nbsp;</td>
+          <td class="mdname1" valign="top" nowrap> <em>portLibrary</em>          </td>
+          <td class="md" valign="top">&nbsp;)&nbsp;</td>
+          <td class="md" nowrap></td>
+        </tr>
+      </table>
+    </td>
+  </tr>
+</table>
+<table cellspacing="5" cellpadding="0" border="0">
+  <tr>
+    <td>
+      &nbsp;
+    </td>
+    <td>
+
+<p>
+PortLibrary shutdown. 
+<p>
+This function is called during shutdown of the portLibrary. Any resources that were created by <a class="el" href="hyipcmutex_8c.html#a9">hyipcmutex_startup</a> should be destroyed here.<p>
+<dl compact><dt><b>Parameters:</b></dt><dd>
+  <table border="0" cellspacing="2" cellpadding="0">
+    <tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>portLibrary</em>&nbsp;</td><td>The port library</td></tr>
+  </table>
+</dl>
+<dl compact><dt><b>Note:</b></dt><dd>Most implementations will be empty.</dd></dl>
+    </td>
+  </tr>
+</table>
+<a class="anchor" name="a9"></a><!-- doxytag: member="hyipcmutex.c::hyipcmutex_startup" ref="a9" args="(struct HyPortLibrary *portLibrary)" --><p>
+<table class="mdTable" cellpadding="2" cellspacing="0">
+  <tr>
+    <td class="mdRow">
+      <table cellpadding="0" cellspacing="0" border="0">
+        <tr>
+          <td class="md" nowrap valign="top">I_32 VMCALL hyipcmutex_startup           </td>
+          <td class="md" valign="top">(&nbsp;</td>
+          <td class="md" nowrap valign="top">struct <a class="el" href="structHyPortLibrary.html">HyPortLibrary</a> *&nbsp;</td>
+          <td class="mdname1" valign="top" nowrap> <em>portLibrary</em>          </td>
+          <td class="md" valign="top">&nbsp;)&nbsp;</td>
+          <td class="md" nowrap></td>
+        </tr>
+      </table>
+    </td>
+  </tr>
+</table>
+<table cellspacing="5" cellpadding="0" border="0">
+  <tr>
+    <td>
+      &nbsp;
+    </td>
+    <td>
+
+<p>
+PortLibrary startup. 
+<p>
+This function is called during startup of the portLibrary. Any resources that are required for the IPC mutex operations may be created here. All resources created here should be destroyed in <a class="el" href="hyipcmutex_8c.html#a8">hyipcmutex_shutdown</a>.<p>
+<dl compact><dt><b>Parameters:</b></dt><dd>
+  <table border="0" cellspacing="2" cellpadding="0">
+    <tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>portLibrary</em>&nbsp;</td><td>The port library</td></tr>
+  </table>
+</dl>
+<dl compact><dt><b>Returns:</b></dt><dd>0 on success, negative error code on failure. Error code values returned are <ul>
+<li>HYPORT_ERROR_STARTUP_IPCMUTEX</li>
+</ul>
+</dd></dl>
+<dl compact><dt><b>Note:</b></dt><dd>Most implementations will simply return success.</dd></dl>
+    </td>
+  </tr>
+</table>
+<hr size="1">
+<address style="text-align: center;">
+  <small>
+    (c) Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
+  </small>
+</address>
+</body>
+</html>

Added: incubator/harmony/enhanced/trunk/sandbox/contribs/ibm_core/doc/vm_doc/html/hymem_8c.html
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/trunk/sandbox/contribs/ibm_core/doc/vm_doc/html/hymem_8c.html?rev=350181&view=auto
==============================================================================
--- incubator/harmony/enhanced/trunk/sandbox/contribs/ibm_core/doc/vm_doc/html/hymem_8c.html (added)
+++ incubator/harmony/enhanced/trunk/sandbox/contribs/ibm_core/doc/vm_doc/html/hymem_8c.html Wed Nov 30 21:29:27 2005
@@ -0,0 +1,338 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
+<title>Harmony Class Library Porting: native-src/win.IA32/port/hymem.c File Reference</title>
+<link href="hydoxygen.css" rel="stylesheet" type="text/css">
+</head><body>
+<!-- Generated by Doxygen 1.4.4 -->
+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="hierarchy.html">Class&nbsp;Hierarchy</a> | <a class="qindex" href="annotated.html">Data&nbsp;Structures</a> | <a class="qindex" href="dirs.html">Directories</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Data&nbsp;Fields</a> | <a class="qindex" href="globals.html">Globals</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>
+<div class="nav">
+<a class="el" href="dir_000000.html">native-src</a>&nbsp;&raquo&nbsp;<a class="el" href="dir_000001.html">win.IA32</a>&nbsp;&raquo&nbsp;<a class="el" href="dir_000007.html">port</a></div>
+<h1>hymem.c File Reference</h1><hr><a name="_details"></a><h2>Detailed Description</h2>
+Memory Utilities. 
+<p>
+
+<p>
+<code>#include &lt;windows.h&gt;</code><br>
+<code>#include &quot;<a class="el" href="hyport_8h.html">hyport.h</a>&quot;</code><br>
+<code>#include &quot;portpriv.h&quot;</code><br>
+<code>#include &quot;hyportpg.h&quot;</code><br>
+<code>#include &quot;ut_hyprt.h&quot;</code><br>
+<table border="0" cellpadding="0" cellspacing="0">
+<tr><td></td></tr>
+<tr><td colspan="2"><br><h2>Functions</h2></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">void *VMCALL&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="hymem_8c.html#a10">hymem_allocate_memory</a> (struct <a class="el" href="structHyPortLibrary.html">HyPortLibrary</a> *portLibrary, UDATA byteAmount)</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Allocate memory.  <a href="#a10"></a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">void VMCALL&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="hymem_8c.html#a11">hymem_free_memory</a> (struct <a class="el" href="structHyPortLibrary.html">HyPortLibrary</a> *portLibrary, void *memoryPointer)</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Deallocate memory.  <a href="#a11"></a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">void *VMCALL&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="hymem_8c.html#a12">hymem_reallocate_memory</a> (struct <a class="el" href="structHyPortLibrary.html">HyPortLibrary</a> *portLibrary, void *memoryPointer, UDATA byteAmount)</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Re-allocate memory.  <a href="#a12"></a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">void VMCALL&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="hymem_8c.html#a13">hymem_shutdown</a> (struct <a class="el" href="structHyPortLibrary.html">HyPortLibrary</a> *portLibrary)</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">PortLibrary shutdown.  <a href="#a13"></a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">I_32 VMCALL&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="hymem_8c.html#a14">hymem_startup</a> (struct <a class="el" href="structHyPortLibrary.html">HyPortLibrary</a> *portLibrary, UDATA portGlobalSize)</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">PortLibrary startup.  <a href="#a14"></a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">void *VMCALL&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="hymem_8c.html#a15">hymem_allocate_memory_callSite</a> (struct <a class="el" href="structHyPortLibrary.html">HyPortLibrary</a> *portLibrary, UDATA byteAmount, char *callSite)</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Allocate memory.  <a href="#a15"></a><br></td></tr>
+</table>
+<hr><h2>Function Documentation</h2>
+<a class="anchor" name="a10"></a><!-- doxytag: member="hymem.c::hymem_allocate_memory" ref="a10" args="(struct HyPortLibrary *portLibrary, UDATA byteAmount)" --><p>
+<table class="mdTable" cellpadding="2" cellspacing="0">
+  <tr>
+    <td class="mdRow">
+      <table cellpadding="0" cellspacing="0" border="0">
+        <tr>
+          <td class="md" nowrap valign="top">void* VMCALL hymem_allocate_memory           </td>
+          <td class="md" valign="top">(&nbsp;</td>
+          <td class="md" nowrap valign="top">struct <a class="el" href="structHyPortLibrary.html">HyPortLibrary</a> *&nbsp;</td>
+          <td class="mdname" nowrap> <em>portLibrary</em>, </td>
+        </tr>
+        <tr>
+          <td class="md" nowrap align="right"></td>
+          <td class="md"></td>
+          <td class="md" nowrap>UDATA&nbsp;</td>
+          <td class="mdname" nowrap> <em>byteAmount</em></td>
+        </tr>
+        <tr>
+          <td class="md"></td>
+          <td class="md">)&nbsp;</td>
+          <td class="md" colspan="2"></td>
+        </tr>
+      </table>
+    </td>
+  </tr>
+</table>
+<table cellspacing="5" cellpadding="0" border="0">
+  <tr>
+    <td>
+      &nbsp;
+    </td>
+    <td>
+
+<p>
+Allocate memory. 
+<p>
+<dl compact><dt><b>Parameters:</b></dt><dd>
+  <table border="0" cellspacing="2" cellpadding="0">
+    <tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>portLibrary</em>&nbsp;</td><td>The port library </td></tr>
+    <tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>byteAmount</em>&nbsp;</td><td>Number of bytes to allocate.</td></tr>
+  </table>
+</dl>
+<dl compact><dt><b>Returns:</b></dt><dd>pointer to memory on success, NULL on error. <p>
+Memory is not guaranteed to be zeroed as part of this call</dd></dl>
+    </td>
+  </tr>
+</table>
+<a class="anchor" name="a15"></a><!-- doxytag: member="hymem.c::hymem_allocate_memory_callSite" ref="a15" args="(struct HyPortLibrary *portLibrary, UDATA byteAmount, char *callSite)" --><p>
+<table class="mdTable" cellpadding="2" cellspacing="0">
+  <tr>
+    <td class="mdRow">
+      <table cellpadding="0" cellspacing="0" border="0">
+        <tr>
+          <td class="md" nowrap valign="top">void* VMCALL hymem_allocate_memory_callSite           </td>
+          <td class="md" valign="top">(&nbsp;</td>
+          <td class="md" nowrap valign="top">struct <a class="el" href="structHyPortLibrary.html">HyPortLibrary</a> *&nbsp;</td>
+          <td class="mdname" nowrap> <em>portLibrary</em>, </td>
+        </tr>
+        <tr>
+          <td class="md" nowrap align="right"></td>
+          <td class="md"></td>
+          <td class="md" nowrap>UDATA&nbsp;</td>
+          <td class="mdname" nowrap> <em>byteAmount</em>, </td>
+        </tr>
+        <tr>
+          <td class="md" nowrap align="right"></td>
+          <td class="md"></td>
+          <td class="md" nowrap>char *&nbsp;</td>
+          <td class="mdname" nowrap> <em>callSite</em></td>
+        </tr>
+        <tr>
+          <td class="md"></td>
+          <td class="md">)&nbsp;</td>
+          <td class="md" colspan="2"></td>
+        </tr>
+      </table>
+    </td>
+  </tr>
+</table>
+<table cellspacing="5" cellpadding="0" border="0">
+  <tr>
+    <td>
+      &nbsp;
+    </td>
+    <td>
+
+<p>
+Allocate memory. 
+<p>
+<dl compact><dt><b>Parameters:</b></dt><dd>
+  <table border="0" cellspacing="2" cellpadding="0">
+    <tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>portLibrary</em>&nbsp;</td><td>The port library </td></tr>
+    <tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>byteAmount</em>&nbsp;</td><td>Number of bytes to allocate. </td></tr>
+    <tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>callSite</em>&nbsp;</td><td>String describing callsite, usually file and line number.</td></tr>
+  </table>
+</dl>
+<dl compact><dt><b>Returns:</b></dt><dd>pointer to memory on success, NULL on error.</dd></dl>
+    </td>
+  </tr>
+</table>
+<a class="anchor" name="a11"></a><!-- doxytag: member="hymem.c::hymem_free_memory" ref="a11" args="(struct HyPortLibrary *portLibrary, void *memoryPointer)" --><p>
+<table class="mdTable" cellpadding="2" cellspacing="0">
+  <tr>
+    <td class="mdRow">
+      <table cellpadding="0" cellspacing="0" border="0">
+        <tr>
+          <td class="md" nowrap valign="top">void VMCALL hymem_free_memory           </td>
+          <td class="md" valign="top">(&nbsp;</td>
+          <td class="md" nowrap valign="top">struct <a class="el" href="structHyPortLibrary.html">HyPortLibrary</a> *&nbsp;</td>
+          <td class="mdname" nowrap> <em>portLibrary</em>, </td>
+        </tr>
+        <tr>
+          <td class="md" nowrap align="right"></td>
+          <td class="md"></td>
+          <td class="md" nowrap>void *&nbsp;</td>
+          <td class="mdname" nowrap> <em>memoryPointer</em></td>
+        </tr>
+        <tr>
+          <td class="md"></td>
+          <td class="md">)&nbsp;</td>
+          <td class="md" colspan="2"></td>
+        </tr>
+      </table>
+    </td>
+  </tr>
+</table>
+<table cellspacing="5" cellpadding="0" border="0">
+  <tr>
+    <td>
+      &nbsp;
+    </td>
+    <td>
+
+<p>
+Deallocate memory. 
+<p>
+<dl compact><dt><b>Parameters:</b></dt><dd>
+  <table border="0" cellspacing="2" cellpadding="0">
+    <tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>portLibrary</em>&nbsp;</td><td>The port library </td></tr>
+    <tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>memoryPointer</em>&nbsp;</td><td>Base address of memory to be deallocated.</td></tr>
+  </table>
+</dl>
+    </td>
+  </tr>
+</table>
+<a class="anchor" name="a12"></a><!-- doxytag: member="hymem.c::hymem_reallocate_memory" ref="a12" args="(struct HyPortLibrary *portLibrary, void *memoryPointer, UDATA byteAmount)" --><p>
+<table class="mdTable" cellpadding="2" cellspacing="0">
+  <tr>
+    <td class="mdRow">
+      <table cellpadding="0" cellspacing="0" border="0">
+        <tr>
+          <td class="md" nowrap valign="top">void* VMCALL hymem_reallocate_memory           </td>
+          <td class="md" valign="top">(&nbsp;</td>
+          <td class="md" nowrap valign="top">struct <a class="el" href="structHyPortLibrary.html">HyPortLibrary</a> *&nbsp;</td>
+          <td class="mdname" nowrap> <em>portLibrary</em>, </td>
+        </tr>
+        <tr>
+          <td class="md" nowrap align="right"></td>
+          <td class="md"></td>
+          <td class="md" nowrap>void *&nbsp;</td>
+          <td class="mdname" nowrap> <em>memoryPointer</em>, </td>
+        </tr>
+        <tr>
+          <td class="md" nowrap align="right"></td>
+          <td class="md"></td>
+          <td class="md" nowrap>UDATA&nbsp;</td>
+          <td class="mdname" nowrap> <em>byteAmount</em></td>
+        </tr>
+        <tr>
+          <td class="md"></td>
+          <td class="md">)&nbsp;</td>
+          <td class="md" colspan="2"></td>
+        </tr>
+      </table>
+    </td>
+  </tr>
+</table>
+<table cellspacing="5" cellpadding="0" border="0">
+  <tr>
+    <td>
+      &nbsp;
+    </td>
+    <td>
+
+<p>
+Re-allocate memory. 
+<p>
+<dl compact><dt><b>Parameters:</b></dt><dd>
+  <table border="0" cellspacing="2" cellpadding="0">
+    <tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>portLibrary</em>&nbsp;</td><td>The port library </td></tr>
+    <tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>memoryPointer</em>&nbsp;</td><td>Base address of memory to be re-allocated. </td></tr>
+    <tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>byteAmount</em>&nbsp;</td><td>Number of bytes to re-allocated.</td></tr>
+  </table>
+</dl>
+<dl compact><dt><b>Returns:</b></dt><dd>pointer to memory on success, NULL on error.</dd></dl>
+    </td>
+  </tr>
+</table>
+<a class="anchor" name="a13"></a><!-- doxytag: member="hymem.c::hymem_shutdown" ref="a13" args="(struct HyPortLibrary *portLibrary)" --><p>
+<table class="mdTable" cellpadding="2" cellspacing="0">
+  <tr>
+    <td class="mdRow">
+      <table cellpadding="0" cellspacing="0" border="0">
+        <tr>
+          <td class="md" nowrap valign="top">void VMCALL hymem_shutdown           </td>
+          <td class="md" valign="top">(&nbsp;</td>
+          <td class="md" nowrap valign="top">struct <a class="el" href="structHyPortLibrary.html">HyPortLibrary</a> *&nbsp;</td>
+          <td class="mdname1" valign="top" nowrap> <em>portLibrary</em>          </td>
+          <td class="md" valign="top">&nbsp;)&nbsp;</td>
+          <td class="md" nowrap></td>
+        </tr>
+      </table>
+    </td>
+  </tr>
+</table>
+<table cellspacing="5" cellpadding="0" border="0">
+  <tr>
+    <td>
+      &nbsp;
+    </td>
+    <td>
+
+<p>
+PortLibrary shutdown. 
+<p>
+This function is called during shutdown of the portLibrary. Any resources that were created by <a class="el" href="hymem_8c.html#a14">hymem_startup</a> should be destroyed here.<p>
+<dl compact><dt><b>Parameters:</b></dt><dd>
+  <table border="0" cellspacing="2" cellpadding="0">
+    <tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>portLibrary</em>&nbsp;</td><td>The port library</td></tr>
+  </table>
+</dl>
+<dl compact><dt><b>Note:</b></dt><dd>Must deallocate portGlobals. <p>
+Most implementations will just deallocate portGlobals.</dd></dl>
+    </td>
+  </tr>
+</table>
+<a class="anchor" name="a14"></a><!-- doxytag: member="hymem.c::hymem_startup" ref="a14" args="(struct HyPortLibrary *portLibrary, UDATA portGlobalSize)" --><p>
+<table class="mdTable" cellpadding="2" cellspacing="0">
+  <tr>
+    <td class="mdRow">
+      <table cellpadding="0" cellspacing="0" border="0">
+        <tr>
+          <td class="md" nowrap valign="top">I_32 VMCALL hymem_startup           </td>
+          <td class="md" valign="top">(&nbsp;</td>
+          <td class="md" nowrap valign="top">struct <a class="el" href="structHyPortLibrary.html">HyPortLibrary</a> *&nbsp;</td>
+          <td class="mdname" nowrap> <em>portLibrary</em>, </td>
+        </tr>
+        <tr>
+          <td class="md" nowrap align="right"></td>
+          <td class="md"></td>
+          <td class="md" nowrap>UDATA&nbsp;</td>
+          <td class="mdname" nowrap> <em>portGlobalSize</em></td>
+        </tr>
+        <tr>
+          <td class="md"></td>
+          <td class="md">)&nbsp;</td>
+          <td class="md" colspan="2"></td>
+        </tr>
+      </table>
+    </td>
+  </tr>
+</table>
+<table cellspacing="5" cellpadding="0" border="0">
+  <tr>
+    <td>
+      &nbsp;
+    </td>
+    <td>
+
+<p>
+PortLibrary startup. 
+<p>
+This function is called during startup of the portLibrary. Any resources that are required for the memory operations may be created here. All resources created here should be destroyed in <a class="el" href="hymem_8c.html#a13">hymem_shutdown</a>.<p>
+<dl compact><dt><b>Parameters:</b></dt><dd>
+  <table border="0" cellspacing="2" cellpadding="0">
+    <tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>portLibrary</em>&nbsp;</td><td>The port library </td></tr>
+    <tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>portGlobalSize</em>&nbsp;</td><td>Size of the global data structure to allocate</td></tr>
+  </table>
+</dl>
+<dl compact><dt><b>Returns:</b></dt><dd>0 on success, negative error code on failure. Error code values returned are<ul>
+<li>HYPORT_ERROR_STARTUP_MEM</li>
+</ul>
+</dd></dl>
+<dl compact><dt><b>Note:</b></dt><dd>Must allocate portGlobals. <p>
+Most implementations will just allocate portGlobals.</dd></dl>
+    </td>
+  </tr>
+</table>
+<hr size="1">
+<address style="text-align: center;">
+  <small>
+    (c) Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
+  </small>
+</address>
+</body>
+</html>

Added: incubator/harmony/enhanced/trunk/sandbox/contribs/ibm_core/doc/vm_doc/html/hymmap_8c.html
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/trunk/sandbox/contribs/ibm_core/doc/vm_doc/html/hymmap_8c.html?rev=350181&view=auto
==============================================================================
--- incubator/harmony/enhanced/trunk/sandbox/contribs/ibm_core/doc/vm_doc/html/hymmap_8c.html (added)
+++ incubator/harmony/enhanced/trunk/sandbox/contribs/ibm_core/doc/vm_doc/html/hymmap_8c.html Wed Nov 30 21:29:27 2005
@@ -0,0 +1,254 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
+<title>Harmony Class Library Porting: native-src/win.IA32/port/hymmap.c File Reference</title>
+<link href="hydoxygen.css" rel="stylesheet" type="text/css">
+</head><body>
+<!-- Generated by Doxygen 1.4.4 -->
+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="hierarchy.html">Class&nbsp;Hierarchy</a> | <a class="qindex" href="annotated.html">Data&nbsp;Structures</a> | <a class="qindex" href="dirs.html">Directories</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Data&nbsp;Fields</a> | <a class="qindex" href="globals.html">Globals</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>
+<div class="nav">
+<a class="el" href="dir_000000.html">native-src</a>&nbsp;&raquo&nbsp;<a class="el" href="dir_000001.html">win.IA32</a>&nbsp;&raquo&nbsp;<a class="el" href="dir_000007.html">port</a></div>
+<h1>hymmap.c File Reference</h1><hr><a name="_details"></a><h2>Detailed Description</h2>
+Memory map. 
+<p>
+This module provides memory mapping facilities that allow a user to map files into the virtual address space of the process. There are various options that can be used when mapping a file into memory, such as copy on write. Not all of these options are available on all platforms, <a class="el" href="hymmap_8c.html#a11">hymmap_capabilities</a> provides the list of supported options. Note also that on some platforms memory mapping facilites do not exist at all. On these platforms the API will still be available, but will simply read the file into allocated memory.
+<p>
+<code>#include &lt;windows.h&gt;</code><br>
+<code>#include &quot;<a class="el" href="hyport_8h.html">hyport.h</a>&quot;</code><br>
+<table border="0" cellpadding="0" cellspacing="0">
+<tr><td></td></tr>
+<tr><td colspan="2"><br><h2>Functions</h2></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">void *VMCALL&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="hymmap_8c.html#a7">hymmap_map_file</a> (struct <a class="el" href="structHyPortLibrary.html">HyPortLibrary</a> *portLibrary, const char *path, void **handle)</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Map a file into memory.  <a href="#a7"></a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">void VMCALL&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="hymmap_8c.html#a8">hymmap_unmap_file</a> (struct <a class="el" href="structHyPortLibrary.html">HyPortLibrary</a> *portLibrary, void *handle)</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">UnMap previously mapped memory.  <a href="#a8"></a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">void VMCALL&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="hymmap_8c.html#a9">hymmap_shutdown</a> (struct <a class="el" href="structHyPortLibrary.html">HyPortLibrary</a> *portLibrary)</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">PortLibrary shutdown.  <a href="#a9"></a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">I_32 VMCALL&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="hymmap_8c.html#a10">hymmap_startup</a> (struct <a class="el" href="structHyPortLibrary.html">HyPortLibrary</a> *portLibrary)</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">PortLibrary startup.  <a href="#a10"></a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">I_32 VMCALL&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="hymmap_8c.html#a11">hymmap_capabilities</a> (struct <a class="el" href="structHyPortLibrary.html">HyPortLibrary</a> *portLibrary)</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Check the capabilities available for HYMMAP at runtime for the current platform.  <a href="#a11"></a><br></td></tr>
+</table>
+<hr><h2>Function Documentation</h2>
+<a class="anchor" name="a11"></a><!-- doxytag: member="hymmap.c::hymmap_capabilities" ref="a11" args="(struct HyPortLibrary *portLibrary)" --><p>
+<table class="mdTable" cellpadding="2" cellspacing="0">
+  <tr>
+    <td class="mdRow">
+      <table cellpadding="0" cellspacing="0" border="0">
+        <tr>
+          <td class="md" nowrap valign="top">I_32 VMCALL hymmap_capabilities           </td>
+          <td class="md" valign="top">(&nbsp;</td>
+          <td class="md" nowrap valign="top">struct <a class="el" href="structHyPortLibrary.html">HyPortLibrary</a> *&nbsp;</td>
+          <td class="mdname1" valign="top" nowrap> <em>portLibrary</em>          </td>
+          <td class="md" valign="top">&nbsp;)&nbsp;</td>
+          <td class="md" nowrap></td>
+        </tr>
+      </table>
+    </td>
+  </tr>
+</table>
+<table cellspacing="5" cellpadding="0" border="0">
+  <tr>
+    <td>
+      &nbsp;
+    </td>
+    <td>
+
+<p>
+Check the capabilities available for HYMMAP at runtime for the current platform. 
+<p>
+<dl compact><dt><b>Parameters:</b></dt><dd>
+  <table border="0" cellspacing="2" cellpadding="0">
+    <tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>portLibrary</em>&nbsp;</td><td>The port library</td></tr>
+  </table>
+</dl>
+<dl compact><dt><b>Returns:</b></dt><dd>a bit map containing the capabilites supported by the hymmap sub component of the port library. Possible bit values: HYPORT_MMAP_CAPABILITY_COPYONWRITE - if not present, platform is not capable of "copy on write" memory mapping.</dd></dl>
+    </td>
+  </tr>
+</table>
+<a class="anchor" name="a7"></a><!-- doxytag: member="hymmap.c::hymmap_map_file" ref="a7" args="(struct HyPortLibrary *portLibrary, const char *path, void **handle)" --><p>
+<table class="mdTable" cellpadding="2" cellspacing="0">
+  <tr>
+    <td class="mdRow">
+      <table cellpadding="0" cellspacing="0" border="0">
+        <tr>
+          <td class="md" nowrap valign="top">void* VMCALL hymmap_map_file           </td>
+          <td class="md" valign="top">(&nbsp;</td>
+          <td class="md" nowrap valign="top">struct <a class="el" href="structHyPortLibrary.html">HyPortLibrary</a> *&nbsp;</td>
+          <td class="mdname" nowrap> <em>portLibrary</em>, </td>
+        </tr>
+        <tr>
+          <td class="md" nowrap align="right"></td>
+          <td class="md"></td>
+          <td class="md" nowrap>const char *&nbsp;</td>
+          <td class="mdname" nowrap> <em>path</em>, </td>
+        </tr>
+        <tr>
+          <td class="md" nowrap align="right"></td>
+          <td class="md"></td>
+          <td class="md" nowrap>void **&nbsp;</td>
+          <td class="mdname" nowrap> <em>handle</em></td>
+        </tr>
+        <tr>
+          <td class="md"></td>
+          <td class="md">)&nbsp;</td>
+          <td class="md" colspan="2"></td>
+        </tr>
+      </table>
+    </td>
+  </tr>
+</table>
+<table cellspacing="5" cellpadding="0" border="0">
+  <tr>
+    <td>
+      &nbsp;
+    </td>
+    <td>
+
+<p>
+Map a file into memory. 
+<p>
+<dl compact><dt><b>Parameters:</b></dt><dd>
+  <table border="0" cellspacing="2" cellpadding="0">
+    <tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>portLibrary</em>&nbsp;</td><td>The port library </td></tr>
+    <tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>path</em>&nbsp;</td><td>- the path of the file to mapped into memory. </td></tr>
+    <tr><td valign="top"><tt>[out]</tt>&nbsp;</td><td valign="top"><em>handle</em>&nbsp;</td><td>- updates *handle with the memory map handle, this handle is later passed to unmap.</td></tr>
+  </table>
+</dl>
+<dl compact><dt><b>Returns:</b></dt><dd>pointer to newly mapped memory on success, NULL on error.</dd></dl>
+    </td>
+  </tr>
+</table>
+<a class="anchor" name="a9"></a><!-- doxytag: member="hymmap.c::hymmap_shutdown" ref="a9" args="(struct HyPortLibrary *portLibrary)" --><p>
+<table class="mdTable" cellpadding="2" cellspacing="0">
+  <tr>
+    <td class="mdRow">
+      <table cellpadding="0" cellspacing="0" border="0">
+        <tr>
+          <td class="md" nowrap valign="top">void VMCALL hymmap_shutdown           </td>
+          <td class="md" valign="top">(&nbsp;</td>
+          <td class="md" nowrap valign="top">struct <a class="el" href="structHyPortLibrary.html">HyPortLibrary</a> *&nbsp;</td>
+          <td class="mdname1" valign="top" nowrap> <em>portLibrary</em>          </td>
+          <td class="md" valign="top">&nbsp;)&nbsp;</td>
+          <td class="md" nowrap></td>
+        </tr>
+      </table>
+    </td>
+  </tr>
+</table>
+<table cellspacing="5" cellpadding="0" border="0">
+  <tr>
+    <td>
+      &nbsp;
+    </td>
+    <td>
+
+<p>
+PortLibrary shutdown. 
+<p>
+<dl compact><dt><b>Parameters:</b></dt><dd>
+  <table border="0" cellspacing="2" cellpadding="0">
+    <tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>portLibrary</em>&nbsp;</td><td>The port library</td></tr>
+  </table>
+</dl>
+This function is called during shutdown of the portLibrary. Any resources that were created by <a class="el" href="hymmap_8c.html#a10">hymmap_startup</a> should be destroyed here.    </td>
+  </tr>
+</table>
+<a class="anchor" name="a10"></a><!-- doxytag: member="hymmap.c::hymmap_startup" ref="a10" args="(struct HyPortLibrary *portLibrary)" --><p>
+<table class="mdTable" cellpadding="2" cellspacing="0">
+  <tr>
+    <td class="mdRow">
+      <table cellpadding="0" cellspacing="0" border="0">
+        <tr>
+          <td class="md" nowrap valign="top">I_32 VMCALL hymmap_startup           </td>
+          <td class="md" valign="top">(&nbsp;</td>
+          <td class="md" nowrap valign="top">struct <a class="el" href="structHyPortLibrary.html">HyPortLibrary</a> *&nbsp;</td>
+          <td class="mdname1" valign="top" nowrap> <em>portLibrary</em>          </td>
+          <td class="md" valign="top">&nbsp;)&nbsp;</td>
+          <td class="md" nowrap></td>
+        </tr>
+      </table>
+    </td>
+  </tr>
+</table>
+<table cellspacing="5" cellpadding="0" border="0">
+  <tr>
+    <td>
+      &nbsp;
+    </td>
+    <td>
+
+<p>
+PortLibrary startup. 
+<p>
+This function is called during startup of the portLibrary. Any resources that are required for the memory mapping operations may be created here. All resources created here should be destroyed in <a class="el" href="hymmap_8c.html#a9">hymmap_shutdown</a>.<p>
+<dl compact><dt><b>Parameters:</b></dt><dd>
+  <table border="0" cellspacing="2" cellpadding="0">
+    <tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>portLibrary</em>&nbsp;</td><td>The port library</td></tr>
+  </table>
+</dl>
+<dl compact><dt><b>Returns:</b></dt><dd>0 on success, negative error code on failure. Error code values returned are <ul>
+<li>HYPORT_ERROR_STARTUP_MMAP</li>
+</ul>
+</dd></dl>
+<dl compact><dt><b>Note:</b></dt><dd>Most implementations will simply return success.</dd></dl>
+    </td>
+  </tr>
+</table>
+<a class="anchor" name="a8"></a><!-- doxytag: member="hymmap.c::hymmap_unmap_file" ref="a8" args="(struct HyPortLibrary *portLibrary, void *handle)" --><p>
+<table class="mdTable" cellpadding="2" cellspacing="0">
+  <tr>
+    <td class="mdRow">
+      <table cellpadding="0" cellspacing="0" border="0">
+        <tr>
+          <td class="md" nowrap valign="top">void VMCALL hymmap_unmap_file           </td>
+          <td class="md" valign="top">(&nbsp;</td>
+          <td class="md" nowrap valign="top">struct <a class="el" href="structHyPortLibrary.html">HyPortLibrary</a> *&nbsp;</td>
+          <td class="mdname" nowrap> <em>portLibrary</em>, </td>
+        </tr>
+        <tr>
+          <td class="md" nowrap align="right"></td>
+          <td class="md"></td>
+          <td class="md" nowrap>void *&nbsp;</td>
+          <td class="mdname" nowrap> <em>handle</em></td>
+        </tr>
+        <tr>
+          <td class="md"></td>
+          <td class="md">)&nbsp;</td>
+          <td class="md" colspan="2"></td>
+        </tr>
+      </table>
+    </td>
+  </tr>
+</table>
+<table cellspacing="5" cellpadding="0" border="0">
+  <tr>
+    <td>
+      &nbsp;
+    </td>
+    <td>
+
+<p>
+UnMap previously mapped memory. 
+<p>
+<dl compact><dt><b>Parameters:</b></dt><dd>
+  <table border="0" cellspacing="2" cellpadding="0">
+    <tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>portLibrary</em>&nbsp;</td><td>The port library</td></tr>
+    <tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>handle</em>&nbsp;</td><td>- the handle from the mmap_map_file.</td></tr>
+  </table>
+</dl>
+    </td>
+  </tr>
+</table>
+<hr size="1">
+<address style="text-align: center;">
+  <small>
+    (c) Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
+  </small>
+</address>
+</body>
+</html>