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