]>
Commit | Line | Data |
---|---|---|
13fec989 A |
1 | <h2>thread_wire</h2> |
2 | <hr> | |
3 | <p> | |
4 | <strong>Function</strong> - Mark the thread as privileged with respect to kernel resources. | |
5 | <h3>SYNOPSIS</h3> | |
6 | <pre> | |
7 | <strong>kern_return_t thread_wire</strong> | |
8 | <strong>(host_priv_t</strong> <var>host_priv</var>, | |
9 | <strong>thread_act_t</strong> <var>thread</var>, | |
10 | <strong>boolean_t</strong> <var>wired</var><strong>);</strong> | |
11 | </pre> | |
12 | <h3>PARAMETERS</h3> | |
13 | <dl> | |
14 | <p> | |
15 | <dt> <var>host_priv</var> | |
16 | <dd> | |
17 | [in host-control send right] | |
18 | The privileged control port for the host on | |
19 | which the thread executes. | |
20 | <p> | |
21 | <dt> <var>thread</var> | |
22 | <dd> | |
23 | [in thread send right] | |
24 | The thread to be wired. | |
25 | <p> | |
26 | <dt> <var>wired</var> | |
27 | <dd> | |
28 | [in scalar] | |
29 | <strong>TRUE</strong> if the thread is to be wired. | |
30 | </dl> | |
31 | <h3>DESCRIPTION</h3> | |
32 | <p> | |
33 | The <strong>thread_wire</strong> function marks the thread as "wired". | |
34 | A "wired" thread is | |
35 | always eligible to be scheduled and can consume physical memory even when | |
36 | free memory is scarce. This property should be assigned to threads in the | |
37 | default page-out path. Threads not in the default page-out path | |
38 | should not have | |
39 | this property to prevent the kernel's free list of pages from being exhausted. | |
40 | <h3>RETURN VALUES</h3> | |
41 | <dl> | |
42 | <p> | |
43 | <dt> <strong>KERN_INVALID_ARGUMENT</strong> | |
44 | <dd> | |
45 | <var>thread</var> is not a thread port. | |
46 | .P | |
47 | <var>host_priv</var> is not the control port for the host on which <var>thread</var> | |
48 | executes. | |
49 | </dl> | |
50 | <h3>RELATED INFORMATION</h3> | |
51 | <p> | |
52 | Functions: | |
53 | <a href="vm_wire.html"><strong>vm_wire</strong></a>. |