MS_$MAPLX Domain/OS MS_$MAPLX
NAME
ms_$maplx - map objects external to the Apollo file system
SYNOPSIS (C)
#include <apollo/base.h>
#include <apollo/ms.h>
void *ms_$maplx(
char name[],
short int &len,
unsigned long int &start,
unsigned long int &length,
ms_$conc_mode_t &conc,
ms_$acc_mode_t &access,
void *&va,
ms_$map_flags_set_t &flags,
unsigned long int *len_mapped,
status_$t *status)
SYNOPSIS (Pascal)
%include '/sys/ins/base.ins.pas';
%include '/sys/ins/ms.ins.pas';
function ms_$maplx (
in name: univ name_$pname_t;
in len: integer;
in start: linteger;
in length: linteger;
in conc: ms_$conc_mode_t;
in access: ms_$acc_mode_t;
in va: univ_ptr;
in flags: ms_$map_flags_set_t;
out len_mapped: linteger;
out status: status_$t): univ_ptr;
SYNOPSIS (FORTRAN)
%include '/sys/ins/base.ins.ftn'
%include '/sys/ins/ms.ins.ftn'
character*1023 name
integer*2 len, conc, access
integer*4 start, length, address, va, dummy, dummy2
integer*4 flags, len_mapped, status
pointer /address/ dummy
pointer /va/ dummy2
address = ms_$maplx(name, len, start, length, conc, access,
& va, flags, len_mapped, status)
DESCRIPTION
This call maps the file system object at name into the address space of
the calling process, and returns a pointer to the mapped object. This
call differs from ms_$mapl in that the object to be mapped may be on a
foreign file-system. For instance, ms_$maplx allows objects mounted on
an NFS file-system to be mapped into memory.
name The pathname of the object to be mapped.
len The number of bytes to map.
start
The first byte of the object to be mapped.
length
The number of bytes actually mapped.
conc How many concurrent readers and writers the mapping should permit.
access
The accesses requested.
va The virtual address at which the mapping should be established. Must
be set to one of the following:
A specific virtual address
The literal ms_$map_from_top, which directs the OS to choose a vir-
tual address near the high end of the virtual address space
The literal ms_$map_from_bottom, which directs the OS to choose a
virtual address near the low end of the virtual address space
flags
An object of type ms_$map_flags_set_t. Can be set to one or more of
the following:
ms_$keep_on_exec
The requested mapping should be preserved across exec() system
calls. By default, mappings are released when an exec() call
occurs.
ms_$ok_to_extend
The object being mapped may be extended (grow longer) as a
result of accesses via this mapping.
ms_$no_pager
The operating system should not invoke an external pager to
establish a mapping to a non-native object.
ms_$anon
Requests that a mapping to a temporary, anonymous VM object is
established. If this flag is specified to ms_$maplx, a nil
pathname should be supplied. It is meaningless to specify
ms_$ok_to_extend with this flag.
ms_$share
Requests that anonymous mappings be shared across process
forks. By default, ms_$anon mappings are copied across a fork:
the child gets a copy of the parent's mapping, but the parent
and child do not see changes in the mapping made by the other.
If ms_$share is specified, the mapping is instead shared across
a fork: the parent and child share the same mapping, and
changes made by one are propagated to the other.
len_mapped
The number of bytes actually mapped.
status
The returned status.