as_att Kernel Service

Purpose

Selects, allocates, and maps a region in the specified address space for the specified virtual memory object.

Syntax

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

caddr_t as_att (adspacep, vmhandle, offset)
adspace_t *adspacep;
vmhandle_t vmhandle;
caddr_t offset;

Parameters

adspacep Points to the address space structure that defines the address space where the region for the virtual memory object is to be allocated. The getadsp kernel service can obtain this pointer.
vmhandle Describes the virtual memory object being made addressable within a region of the specified address space.
offset Specifies the offset in the virtual memory object and the region being mapped. On this system, the upper 4 bits of this offset are ignored.

Description

The as_att kernel service:

If the specified address space is the current address space, the region becomes immediately addressable. Otherwise, it becomes addressable when the specified address space next becomes the active address space.

Kernel extensions use the as_att kernel service to manage virtual memory object addressability within a region of a particular address space. They are also used by base operating system subroutines such as the shmat and shmdt subroutines.

Subroutines executed by a kernel extension may be executing under a process, with a process address space, or executing under a kernel process, entirely in the current address space. (The as_att service never switches to a user-mode address space.) The getadsp kernel service should be used to get the correct address-space structure pointer in either case.

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

Execution Environment

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

Return Values

If successful, the as_att service returns the address of the offset (specified by the offset parameter) within the region in the specified address space where the virtual memory object was made addressable.

If there are no more free regions within the specified address space, the as_att service will not allocate a region and returns a null address.

Implementation Specifics

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

Related Information

The as_det kernel service, as_geth kernel service, as_getsrval kernel service, as_puth kernel service, getadsp kernel service.

Memory Kernel Services and Understanding Virtual Memory Manager Interfaces in AIX Version 4.3 Kernel Extensions and Device Support Programming Concepts.