Back to Darwin Xnu

Thread Wire

osfmk/man/thread_wire.html

latest1.1 KB
Original Source

thread_wire


Function - Mark the thread as privileged with respect to kernel resources.

SYNOPSIS

**kern\_return\_t thread\_wire**** (host\_priv\_t **host\_priv,** thread\_act\_t **thread,** boolean\_t **wired** );**

PARAMETERS

host_priv[in host-control send right] The privileged control port for the host on which the thread executes.

thread[in thread send right] The thread to be wired.

wired[in scalar] TRUE if the thread is to be wired.

DESCRIPTION

The thread_wire 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.

RETURN VALUES

KERN_INVALID_ARGUMENT thread is not a thread port. .P host_priv is not the control port for the host on which thread executes.

Functions: vm_wire.