MS_$INTRO Domain/OS MS_$INTRO
NAME
intro - mapping file system objects
SYNOPSIS (C)
#include <apollo/base.h>
#include <apollo/ms.h>
SYNOPSIS (Pascal)
%include '/sys/ins/base.ins.pas';
%include '/sys/ins/ms.ins.pas';
SYNOPSIS (FORTRAN)
%include '/sys/ins/base.ins.ftn'
%include '/sys/ins/ms.ins.ftn'
DESCRIPTION
The ms_$ calls map and unmap file system objects. When a process maps an
object, the system places the requested pages of the object within the
virtual address space of the process. The object is paged in as the pro-
cess references addresses that resolve to mapped portions of the object.
The following is a list of the ms_$ calls.
ms_$addmap map more of a object
ms_$advice advise the system on mapped object access
ms_$attributes get the file attributes of a mapped object
ms_$crmapl create, map, and lock an object
ms_$crtemp create, map, and lock a temporary object
ms_$fw_file synchronize a mapped object with the file
system
ms_$fw_partial partially synchronize a mapped object with
the file system
ms_$mapl map and lock an object
ms_$mapl_stream permanently map an object via its XOID
ms_$mk_permanent make a temporary object permanent
ms_$mk_temporary make a permanent object temporary
ms_$neighbors find out if two mapped objects are on the
same volume
ms_$relock change the lock on an object
ms_$remap map a different portion of a mapped object
ms_$truncate truncate a mapped object
ms_$unmap unmap an object
Constants
ms_$extend
The object can be extended.
ms_$no_extend
The object cannot be extended.
Data Types
ms_$acc_mode_t
An enumerated type for describing the access mode for an object. It
takes one of the following values:
ms_$r
Read access.
ms_$rx
Read and execute access.
ms_$wr
Read and write access.
ms_$wrx
Read, write, and execute access.
ms_$riw
"Read with intent to write" (RIW) access.
ms_$access_t
An enumerated type for specifying the usage patterns for accessing a
file. It takes one of the following values:
ms_$normal
Normal access.
ms_$random
Random access.
ms_$sequential
Sequential access.
ms_$advice_opt_t
Reserved for future use with ms_$advice. In Pascal, specify an
empty set for arguments of this type. In C and FORTRAN, set
ms_$advice_opt_t arguments to 0.
ms_$advice_t
Four bytes that are reserved for future use.
ms_$attrib_t
An attribute record. The diagram below illustrates the ms_$attrib_t
data type:
175 168 167 160
______________________________________________________________
| permanent | immutable |
|_____________________________________________________________|
| cur_len |
|_____________________________________________________________|
| cur_len |
|_____________________________________________________________|
| blocks_used |
|_____________________________________________________________|
| blocks_used |
|_____________________________________________________________|
| dtu |
|_____________________________________________________________|
| dtu |
|_____________________________________________________________|
| dtm |
|_____________________________________________________________|
| dtm |
|_____________________________________________________________|
| dtcr |
|_____________________________________________________________|
| dtcr |
______________________________________________________________
15 0
permanent
A Boolean value that indicates whether the object is permanent
(true) or temporary (false).
immutable
A Boolean value that indicates whether the object can be modi-
fied. The value true means that the object is immutable. The
value false means that the object is not immutable and can
therefore be modified.
cur_len
The current length in bytes of the object.
blocks_used
The number of blocks used for the object.
dtu Date and time the object was last used, in time_$clockh_t for-
mat.
dtm Date and time the object was last modified, in time_$clockh_t
format.
dtcr Date and time the object was created, in time_$clockh_t format.
ms_$conc_mode_t
An enumerated type for specifying the concurrency mode for an
object. It takes one of the following values:
ms_$nr_xor_1w
Allow one writer or any number of readers.
ms_$cowriters
Allow any number of readers and/or writers.
ms_$perm_opt_t
An enumerated type for specifying options to ms_$mk_permanent. It
takes one of the following values:
ms_$mk_bak
Make a backup copy of file.
xoid_$t
An extended unique identifier (XOID) for an object. Values of this
type are normally used only by type managers.
127 112
______________________________________________________________
| reserved |
|_____________________________________________________________|
| reserved |
|_____________________________________________________________|
| reserved |
|_____________________________________________________________|
| reserved |
|_____________________________________________________________|
| uid |
|_____________________________________________________________|
| uid |
|_____________________________________________________________|
| uid |
|_____________________________________________________________|
| uid |
______________________________________________________________
15 0
reserved
Reserved for the I/O Switch and type manager.
uid A unique identifier for an object. This element has type
uid_$t.
Errors
ms_$bad_access
Unsupported access rights requested.
ms_$bad_length
Bad length specified.
ms_$different_volumes
One of the pointers passed to ms_$neighbors points to a mapped
object that is locked by a process on another node.
ms_$in_use
Object is locked by another process or is in an incompatible mode.
ms_$insufficient_rights
The calling process has some rights to the object, but not the ones
it requested.
ms_$name_not_found
No object exists with the given name.
ms_$no_rights
The calling process has no rights to the requested object.
ms_$no_space
There is not enough virtual address space available for the process
to map the requested object.
ms_$not_locked
The object specified to ms_$relock is not locked by the calling pro-
cess.
ms_$not_mapped
No object is mapped at the virtual address supplied.
ms_$not_temp
The object specified to ms_$mk_permanent is already permanent.
ms_$object_not_found
The object does not exist, or it is not accessible over the network.
ms_$wrong_level
The calling process attempted to release an object mapped by the
previous program level.