xlate_unpin Kernel Service

Purpose

Unpins all pages of a virtual buffer.

Syntax

int xlate_unpin (dp, baddr, count)
struct xmem *dp;
caddr_t baddr;
int count;

Description

The xlate_unpin kernel service unpins pages from a prior call to the xlate_pin kernel service based on the baddr and count parameters. It does this by utilizing the pretranslated real page numbers appended to the cross memory descriptor pointed to by dp.

If the XLATE_PERSISTENT flag is not set in the prexflags flag word of the pretranslation data structure, the pretranslation data structures are also freed.

Parameters

Item Description
dp Points to the cross memory descriptor.
baddr Points to the virtual buffer.
count Specifies the length of the virtual buffer.

Return Values

If successful, the xlate_unpin kernel service returns 0. If unsuccessful, one of the following is returned:
Item Description
EINVAL Invalid cross memory descriptor or parameters.
ENOSPC Unable to allocate paging space (case of mmap segment).
ENOSPC Out of Paging Resources.
XMEM_FAIL Page Access violation.