MS_$ADVICE Domain/OS MS_$ADVICE
NAME
ms_$advice - advise the system on mapped object access
SYNOPSIS (C)
#include <apollo/base.h>
#include <apollo/ms.h>
void ms_$advice(
void *&address,
unsigned long int &length,
ms_$access_t &access,
ms_$advice_t &options,
unsigned long int &record_length,
status_$t *status)
SYNOPSIS (Pascal)
%include '/sys/ins/base.ins.pas';
%include '/sys/ins/ms.ins.pas';
procedure ms_$advice(
in address: univ_ptr;
in length: linteger;
in access: ms_$access_t;
in options: ms_$advice_t;
in record_length: linteger;
out status: status_$t);
SYNOPSIS (FORTRAN)
%include '/sys/ins/base.ins.ftn'
%include '/sys/ins/ms.ins.ftn'
integer*4 length, options, record_length, status
integer*2 access
integer*4 address, dummy
pointer /address/ dummy
call ms_$advice(address, length, access, options,
& record_length, status)
DESCRIPTION
This call advises the system on how a program plans to access an object.
Although it is not required, use ms_$advice whenever the type of access
can be predicted in advance. A process can call ms_$advice more than
once to change the advice for an object mapped into its address space.
The access advice for an object is propagated across calls to ms_$addmap
and ms_$remap; it applies to all portions of an object mapped by the cal-
ling process.
address
A pointer to the object the advice is for.
length
The number of bytes in the mapped portion.
access
The method of accessing the object. Specify one of the following
values:
ms_$normal
Advice cannot be provided. This is the default. If a process
never calls ms_$advice, the assumed advice is ms_$normal.
ms_$random
The calling process will access the object randomly.
ms_$sequential
The calling process will access the object sequentially.
options
This argument is reserved for future use. In Pascal, pass an empty
set in options; in C and FORTRAN, pass 0.
record_length
The number of bytes in a record of the mapped object. Specify 0 if
the record length is unknown, or if the object is not record-
structured.
status
The completion status.
SEE ALSO
ms_$attributes.