Unpins the address range in system (kernel) address space.
#include <sys/types.h> #include <sys/errno.h> #include <sys/pin.h>
int unpin (addr, length) caddr addr; int length;
addr | Specifies the address of the first byte to unpin in the system (kernel) address space. |
length | Specifies the number of bytes to unpin. |
The unpin kernel service decreases the pin count of each page in the address range. When the pin count is 0, the page is not pinned and can be paged out of real memory. Upon finding an unpinned page, the unpin service returns the EINVAL error code and leaves any remaining pinned pages still pinned.
The unpin service can only be called with addresses in the system (kernel) address space. The unpinu service should be used where the address space might be in either user or kernel space.
The unpin kernel service can be called from either the process or interrupt environment.
The unpin kernel service is part of Base Operating System (BOS) Runtime.
The pin kernel service, pinu kernel service, unpinu kernel service.
Understanding Execution Environments and Memory Kernel Services in AIX Kernel Extensions and Device Support Programming Concepts.