forked from apple/darwin-xnu
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathledger_create.html
69 lines (69 loc) · 2.1 KB
/
ledger_create.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
<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>.