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