as_getsrval Kernel Service

Purpose

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

Syntax

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

vmhandle_t as_getsrval (Adspacep, Addr)
adspace_t  *Adspacep;
caddr_t    Addr;

Parameters

Adspacep Points to the address space structure to obtain the virtual memory object handle from. The getadsp kernel service can obtain this pointer.
Addr Specifies the virtual memory address that should be used to determine the virtual memory object handle for the specified address space.

Description

The as_getsrval kernel service is used to obtain a handle to the virtual memory object corresponding to a virtual memory address in a particular address space. This handle can then be used with the as_att or vm_att kernel services to make the object addressable in another address space.

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

The as_puth kernel service must not be called for handles returned by the as_getsrval kernel service.

Execution Environment

The as_getsrval kernel service can be called from both the interrupt and the process environments.

Return Values

The as_getsrval kernel service always succeeds and returns the appropriate handle.

Implementation Specifics

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

Related Information

The getadsp kernel service, as_att kernel service, vm_att kernel service, as_geth kernel service, and as_puth kernel service.