thread_wire.html   [plain text]

<strong>Function</strong> - Mark the thread as privileged with respect to kernel resources.
<strong>kern_return_t   thread_wire</strong>
                <strong>(host_priv_t</strong>                          <var>host_priv</var>,
                 <strong>thread_act_t</strong>                            <var>thread</var>,
                 <strong>boolean_t</strong>                                <var>wired</var><strong>);</strong>
<dt> <var>host_priv</var> 
[in host-control send right]
The privileged control port for the host on 
which the thread executes.
<dt> <var>thread</var> 
[in thread send right]
The thread to be wired.
<dt> <var>wired</var> 
[in scalar]
<strong>TRUE</strong> if the thread is to be wired.
The <strong>thread_wire</strong> function marks the thread as "wired".
A "wired" thread is
always eligible to be scheduled and can consume physical memory even when 
free memory is scarce.  This property should be assigned to threads in the
default page-out path.  Threads not in the default page-out path
should not have 
this property to prevent the kernel's free list of pages from being exhausted.
<dt> <strong>KERN_INVALID_ARGUMENT</strong>
<var>thread</var> is not a thread port.
<var>host_priv</var> is not the control port for the host on which <var>thread</var>
<a href="vm_wire.html"><strong>vm_wire</strong></a>.