MS_$UNMAP Domain/OS MS_$UNMAP
NAME
ms_$unmap - unmap an object
SYNOPSIS (C)
#include <apollo/base.h>
#include <apollo/ms.h>
void ms_$unmap(
void *&address,
unsigned long int &length,
status_$t *status)
SYNOPSIS (Pascal)
%include '/sys/ins/base.ins.pas';
%include '/sys/ins/ms.ins.pas';
procedure ms_$unmap(
in address: univ_ptr;
in length: linteger;
out status: status_$t);
SYNOPSIS (FORTRAN)
%include '/sys/ins/base.ins.ftn'
%include '/sys/ins/ms.ins.ftn'
integer*4 status, length
integer*4 address, dummy
pointer /address/ dummy
call ms_$unmap(address, length, status)
DESCRIPTION
This call unmaps the portion of an object mapped at address. When a pro-
cess unmaps the first portion of an object it has mapped, it also
releases all locks it holds on the object.
address
A pointer to the portion of the mapped object to unmap.
length
The number of bytes mapped at address to be written to the file sys-
tem object. The length argument should usually be set equal to the
number of bytes actually mapped by the call that returned the
pointer supplied in address. Any data in the mapped portion beyond
length bytes from address cannot be recovered after the call to
ms_$unmap.
status
The completion status. If the pointer passed in address does not
point to a mapped object, ms_$unmap will return with ms_$not_mapped
in status.
NOTES
If the mapped object resides on a remote volume, changes made in the
mapped portion will have been written back to the original object by the
time ms_$unmap returns. If the mapped object resides on a local volume,
it may be wise to call ms_$fw_file or ms_$fw_partial before unmapping the
object to ensure that the object is stored safely in the event of a sys-
tem crash.
If a process has extended a mapped object, the object's length attribute
may not be accurate when unmapped. Call ms_$truncate before ms_$unmap if
an extended object's length attribute is important.
SEE ALSO
ms_$addmap, ms_$crmapl, ms_$crtemp, ms_$mapl, ms_$mapl_stream,
ms_$mk_permanent, ms_$mk_temporary, ms_$remap.