as_att64 Kernel Service
Purpose
Allocates and maps a specified region in the current user address space.
Syntax
#include <sys/types.h> #include <sys/errno.h> #include <sys/vmuser.h> #include <sys/adspace.h> unsigned long long as_att64 (vmhandle, offset) vmhandle_t vmhandle; int offset;
Parameters
Item | Description |
---|---|
vmhandle | Describes the virtual memory object being made addressable in the address space. |
offset | Specifies the offset in the virtual memory object. The upper 4-bits of this offset are ignored. |
Description
Item | Description |
---|---|
The as_att64 kernel service: | Selects an unallocated region within the current user address space. |
Allocates the region. | |
Maps the virtual memory object selected by the vmhandle parameter with the access permission specified in the handle. | |
Constructs the address of the offset specified by the offset parameter within the user-address space. |
The as_att64 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_att64 kernel service can be called from the process environment only.
Return Values
On successful completion, this service returns the base address plus the input offset (offset) into the allocated region.
Item | Description |
---|---|
NULL | An error occurred and ernno indicates the cause: |
EINVAL | Address specified is out of range, or |
ENOMEM | Could not allocate due to insufficient resources. |