]> git.saurik.com Git - apple/xnu.git/blobdiff - osfmk/man/ledger_create.html
xnu-792.6.76.tar.gz
[apple/xnu.git] / osfmk / man / ledger_create.html
index 6971798f002e28470eed4a7213fe7c25c564f434..3a4030443b35db9ba18f88af98c0a36d786538bb 100755 (executable)
@@ -1 +1,69 @@
-<h2>ledger_create</h2>\r<hr>\r<p>\r<strong>Function</strong> - Create a subordinate ledger.\r<h3>SYNOPSIS</h3>\r<pre>\r<strong>kern_return_t   ledger_create</strong>\r                <strong>(ledger_port_t</strong>                    <var>parent_ledger</var>,\r                 <strong>ledger_port_t</strong>                    <var>ledger_ledger</var>,\r                 <strong>ledger_port_t</strong>                     <var>child_ledger</var>,\r                 <strong>ledger_item_t</strong>                         <var>transfer</var><strong>);</strong>\r</pre>\r<h3>PARAMETERS</h3>\r<dl>\r<p>\r<dt> <var>parent_ledger</var> \r<dd>\r[in ledger send right]\rThe parent ledger.\r<p>\r<dt> <var>ledger_ledger</var> \r<dd>\r[in ledger send right]\rThe wired kernel memory ledger providing the \rspace from which the ledger itself is drawn.\r<p>\r<dt> <var>child_ledger</var> \r<dd>\r[out ledger send right]\rThe new child ledger, of the same resource type \ras the parent ledger.\r<p>\r<dt> <var>transfer</var> \r<dd>\r[in scalar]\rThe resource amount to transfer to the new ledger.\r</dl>\r<h3>DESCRIPTION</h3>\r<p>\rThe <strong>ledger_create</strong> function creates a subordinate ledger.\rResource limits can be \rtransferred from the parent ledger.  The child ledger itself\ris accounted against \rthe <var>ledger_ledger</var>.  A new ledger inherits the remote service port.\r<h3>NOTES</h3>\r<p>\rThis interface is not implemented in OSF/1 R1.3.\r<p>\rA ledger limit of <strong>LEDGER_ITEM_INFINITE</strong> allows any amount (even\rinfinity) to be withdrawn.  The root ledger has such a limit.\r<h3>RETURN VALUES</h3>\r<dl>\r<p>\r<dt> <strong>KERN_RESOURCE_SHORTAGE</strong>\r<dd>\rTransferring the resources would cause the parent ledger to exceed its \rlimits.\r<p>\r<dt> <strong>KERN_INVALID_LEDGER</strong>\r<dd>\r<var>ledger_ledger</var> is not a wired kernel memory ledger.\r</dl>\r<h3>RELATED INFORMATION</h3>\r<p>\rFunctions:\r<a href="ledger_transfer.html"><strong>ledger_transfer</strong></a>,\r<a href="ledger_terminate.html"><strong>ledger_terminate</strong></a>,\r<a href="ledger_read.html"><strong>ledger_read</strong></a>,\r<a href="ledger_set_remote.html"><strong>ledger_set_remote</strong></a>.\r
\ No newline at end of file
+<h2>ledger_create</h2>
+<hr>
+<p>
+<strong>Function</strong> - Create a subordinate ledger.
+<h3>SYNOPSIS</h3>
+<pre>
+<strong>kern_return_t   ledger_create</strong>
+                <strong>(ledger_port_t</strong>                    <var>parent_ledger</var>,
+                 <strong>ledger_port_t</strong>                    <var>ledger_ledger</var>,
+                 <strong>ledger_port_t</strong>                     <var>child_ledger</var>,
+                 <strong>ledger_item_t</strong>                         <var>transfer</var><strong>);</strong>
+</pre>
+<h3>PARAMETERS</h3>
+<dl>
+<p>
+<dt> <var>parent_ledger</var> 
+<dd>
+[in ledger send right]
+The parent ledger.
+<p>
+<dt> <var>ledger_ledger</var> 
+<dd>
+[in ledger send right]
+The wired kernel memory ledger providing the 
+space from which the ledger itself is drawn.
+<p>
+<dt> <var>child_ledger</var> 
+<dd>
+[out ledger send right]
+The new child ledger, of the same resource type 
+as the parent ledger.
+<p>
+<dt> <var>transfer</var> 
+<dd>
+[in scalar]
+The resource amount to transfer to the new ledger.
+</dl>
+<h3>DESCRIPTION</h3>
+<p>
+The <strong>ledger_create</strong> function creates a subordinate ledger.
+Resource limits can be 
+transferred from the parent ledger.  The child ledger itself
+is accounted against 
+the <var>ledger_ledger</var>.  A new ledger inherits the remote service port.
+<h3>NOTES</h3>
+<p>
+This interface is not implemented in OSF/1 R1.3.
+<p>
+A ledger limit of <strong>LEDGER_ITEM_INFINITE</strong> allows any amount (even
+infinity) to be withdrawn.  The root ledger has such a limit.
+<h3>RETURN VALUES</h3>
+<dl>
+<p>
+<dt> <strong>KERN_RESOURCE_SHORTAGE</strong>
+<dd>
+Transferring the resources would cause the parent ledger to exceed its 
+limits.
+<p>
+<dt> <strong>KERN_INVALID_LEDGER</strong>
+<dd>
+<var>ledger_ledger</var> is not a wired kernel memory ledger.
+</dl>
+<h3>RELATED INFORMATION</h3>
+<p>
+Functions:
+<a href="ledger_transfer.html"><strong>ledger_transfer</strong></a>,
+<a href="ledger_terminate.html"><strong>ledger_terminate</strong></a>,
+<a href="ledger_read.html"><strong>ledger_read</strong></a>,
+<a href="ledger_set_remote.html"><strong>ledger_set_remote</strong></a>.