as_geth Kernel Service


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


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

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


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.


The as_geth 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.

After the last use of the handle and after it is detached from all address spaces, the as_puth kernel service must be used to indicate this fact. Failure to call the as_puth kernel service may result in resources being permanently unavailable for reuse.

If the handle obtained refers to a virtual memory segment, then that segment is protected from deletion until the as_puth kernel service is called.

If for some reason it is known that the virtual memory object cannot be deleted, the as_getsrval kernel service may be used. This kernel service does not require that the as_puth kernel service be used. This service can also be called from the interrupt environment.

Execution Environment

The as_geth kernel service can be called from the process environment only.

Return Values

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

Implementation Specifics

The as_geth 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_puth kernel service, and as_getsrval kernel service.