as_getsrval64 Kernel Service

Purpose

Obtains a handle to the virtual memory object for the specified address.

Syntax

#include <sys/types.h>
#include <sys/errno.h>
#include <sys/vmuser.h>
#include <sys/adspace.h>

vmhandle_t as_getsrval64 (addr64)
unsigned long long addr64;

Parameters

addr64 Specifies the virtual memory address for which the corresponding handle should be returned.

Description

The as_getsrval64 kernel service is used to obtain a handle to the virtual memory object corresponding to the input address(addr64). This handle can then be used with the as_att64 or vm_att kernel services to make the object addressable at a different location.

This service should only be used when it is known that the virtual memory object cannot be deleted, otherwise the as_geth64 kernel service must be used.

The as_puth64 kernel service must not be called for handles returned by the as_getsrval64 kernel service.

The as_getsrval64 kernel service assumes an address space model of fixed-size virtual memory objects.

This service will operate correctly for both 32-bit and 64-bit user address spaces. It will also work for kernel processes (kprocs).

Note: This service only operates on the current process's address space. It is not allowed to operate on another address space.

Execution Environment

The as_getsrval64 kernel service can be called from the process environment only when the current user address space is 64-bits. If the current user address space is 32-bits, or is a kproc, then as_getsrval64 may be called from an interrupt environment.

Return Values

On successful completion this routine returns the appropriate handle.

On error, this routine returns the value INVLSID defined in sys/seg.h. This is caused by an address out of range.

Errors include: Input address out of range.

Implementation Specifics

The as_getsrval64 kernel service is part of the Base Operating System (BOS) Runtime.

Related Information

The as_att64 kernel service, as_seth64 kernel service, as_det64 kernel service, as_geth64 kernel service, and as_puth64 kernel service.