1*1031c584SApple OSS Distributions<h2>ledger_create</h2> 2*1031c584SApple OSS Distributions<hr> 3*1031c584SApple OSS Distributions<p> 4*1031c584SApple OSS Distributions<strong>Function</strong> - Create a subordinate ledger. 5*1031c584SApple OSS Distributions<h3>SYNOPSIS</h3> 6*1031c584SApple OSS Distributions<pre> 7*1031c584SApple OSS Distributions<strong>kern_return_t ledger_create</strong> 8*1031c584SApple OSS Distributions <strong>(ledger_port_t</strong> <var>parent_ledger</var>, 9*1031c584SApple OSS Distributions <strong>ledger_port_t</strong> <var>ledger_ledger</var>, 10*1031c584SApple OSS Distributions <strong>ledger_port_t</strong> <var>child_ledger</var>, 11*1031c584SApple OSS Distributions <strong>ledger_item_t</strong> <var>transfer</var><strong>);</strong> 12*1031c584SApple OSS Distributions</pre> 13*1031c584SApple OSS Distributions<h3>PARAMETERS</h3> 14*1031c584SApple OSS Distributions<dl> 15*1031c584SApple OSS Distributions<p> 16*1031c584SApple OSS Distributions<dt> <var>parent_ledger</var> 17*1031c584SApple OSS Distributions<dd> 18*1031c584SApple OSS Distributions[in ledger send right] 19*1031c584SApple OSS DistributionsThe parent ledger. 20*1031c584SApple OSS Distributions<p> 21*1031c584SApple OSS Distributions<dt> <var>ledger_ledger</var> 22*1031c584SApple OSS Distributions<dd> 23*1031c584SApple OSS Distributions[in ledger send right] 24*1031c584SApple OSS DistributionsThe wired kernel memory ledger providing the 25*1031c584SApple OSS Distributionsspace from which the ledger itself is drawn. 26*1031c584SApple OSS Distributions<p> 27*1031c584SApple OSS Distributions<dt> <var>child_ledger</var> 28*1031c584SApple OSS Distributions<dd> 29*1031c584SApple OSS Distributions[out ledger send right] 30*1031c584SApple OSS DistributionsThe new child ledger, of the same resource type 31*1031c584SApple OSS Distributionsas the parent ledger. 32*1031c584SApple OSS Distributions<p> 33*1031c584SApple OSS Distributions<dt> <var>transfer</var> 34*1031c584SApple OSS Distributions<dd> 35*1031c584SApple OSS Distributions[in scalar] 36*1031c584SApple OSS DistributionsThe resource amount to transfer to the new ledger. 37*1031c584SApple OSS Distributions</dl> 38*1031c584SApple OSS Distributions<h3>DESCRIPTION</h3> 39*1031c584SApple OSS Distributions<p> 40*1031c584SApple OSS DistributionsThe <strong>ledger_create</strong> function creates a subordinate ledger. 41*1031c584SApple OSS DistributionsResource limits can be 42*1031c584SApple OSS Distributionstransferred from the parent ledger. The child ledger itself 43*1031c584SApple OSS Distributionsis accounted against 44*1031c584SApple OSS Distributionsthe <var>ledger_ledger</var>. A new ledger inherits the remote service port. 45*1031c584SApple OSS Distributions<h3>NOTES</h3> 46*1031c584SApple OSS Distributions<p> 47*1031c584SApple OSS DistributionsThis interface is not implemented in OSF/1 R1.3. 48*1031c584SApple OSS Distributions<p> 49*1031c584SApple OSS DistributionsA ledger limit of <strong>LEDGER_ITEM_INFINITE</strong> allows any amount (even 50*1031c584SApple OSS Distributionsinfinity) to be withdrawn. The root ledger has such a limit. 51*1031c584SApple OSS Distributions<h3>RETURN VALUES</h3> 52*1031c584SApple OSS Distributions<dl> 53*1031c584SApple OSS Distributions<p> 54*1031c584SApple OSS Distributions<dt> <strong>KERN_RESOURCE_SHORTAGE</strong> 55*1031c584SApple OSS Distributions<dd> 56*1031c584SApple OSS DistributionsTransferring the resources would cause the parent ledger to exceed its 57*1031c584SApple OSS Distributionslimits. 58*1031c584SApple OSS Distributions<p> 59*1031c584SApple OSS Distributions<dt> <strong>KERN_INVALID_LEDGER</strong> 60*1031c584SApple OSS Distributions<dd> 61*1031c584SApple OSS Distributions<var>ledger_ledger</var> is not a wired kernel memory ledger. 62*1031c584SApple OSS Distributions</dl> 63*1031c584SApple OSS Distributions<h3>RELATED INFORMATION</h3> 64*1031c584SApple OSS Distributions<p> 65*1031c584SApple OSS DistributionsFunctions: 66*1031c584SApple OSS Distributions<a href="ledger_transfer.html"><strong>ledger_transfer</strong></a>, 67*1031c584SApple OSS Distributions<a href="ledger_terminate.html"><strong>ledger_terminate</strong></a>, 68*1031c584SApple OSS Distributions<a href="ledger_read.html"><strong>ledger_read</strong></a>, 69*1031c584SApple OSS Distributions<a href="ledger_set_remote.html"><strong>ledger_set_remote</strong></a>. 70