Unpins the address range in system (kernel) address space and reallocates paging space for the specified region.
#include <sys/types.h>
#include <sys/errno.h>
#include <sys/pin.h>
int ltunpin (addr, length)
caddr_t addr;
int length;
Item | Description |
---|---|
addr | Specifies the address of the first byte to unpin. |
length | Specifies the number of bytes to unpin. |
The ltunpin kernel service decreases the long-term pin count of each page in the address range. When the long-term pin count becomes 0, the backing storage (paging space) for the memory region is allocated and assigned to the pages. When both the long-term and short-term pin counts are 0, the page is no longer pinned and the ltunpin kernel service will assert. If allocating backing pages would put the system below the low paging space threshold, the call waits until paging space becomes available.
The ltunpin kernel service can only be called with addresses in the system (kernel) address space from the process environment.
Item | Description |
---|---|
0 | Indicates successful completion. |
EINVAL | Indicates that the length parameter is a negative value. |
EIO | Indicates that a permanent I/O error occurred while referencing data. |