[ Previous | Next | Contents | Home | Search ]
AIX Version 4.3 Kernel and Subsystems Technical Reference, Volume 1

ltunpin Kernel Service

Purpose

Unpins the address range in system (kernel) address space and reallocates paging space for the specified region.

Syntax

#include <sys/types.h> 
#include <sys/errno.h>
#include <sys/pin.h>
int   ltunpin (addr, length) 
caddr_t  addr;    
int      length;  

Parameters

addr Specifies the address of the first byte to unpin.
length Specifies the number of bytes to unpin.

Description

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.

Return Values

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.

Related Information

The ltpin kernel service.


[ Previous | Next | Contents | Home | Search ]