MS_$CRTEMP Domain/OS MS_$CRTEMP
NAME
ms_$crtemp - create, map, and lock a temporary object
SYNOPSIS (C)
#include <apollo/base.h>
#include <apollo/ms.h>
void *ms_$crtemp(
char *volume_name,
short int &name_length,
unsigned long int &start,
unsigned long int &desired_length,
ms_$conc_mode_t &concurrency,
status_$t *status)
SYNOPSIS (Pascal)
%include '/sys/ins/base.ins.pas';
%include '/sys/ins/ms.ins.pas';
function ms_$crtemp(
in volume_name: univ name_$pname_t;
in name_length: integer;
in start: linteger;
in desired_length: linteger;
in concurrency: ms_$conc_mode_t;
out status: status_$t): univ_ptr;
SYNOPSIS (FORTRAN)
%include '/sys/ins/base.ins.ftn'
%include '/sys/ins/ms.ins.ftn'
integer*4 start, desired_length, status
integer*2 name_length, concurrency
character volume_name*1023
integer*4 address, dummy
pointer /address/ dummy
address = ms_$crtemp(volume_name, name_length, start,
& desired_length, concurrency, status)
DESCRIPTION
This call creates a temporary object on the volume specified in
volume_name and returns a pointer to the mapped portion of the object.
Temporary files, unlike permanent files, do not have pathnames and do not
persist when unmapped.
Ms_$crtemp implicitly uses an access mode of ms_$wr and sets the extend
attribute to true, so the object is always mapped for write access and
extendable to the limit specified in the desired_length argument.
volume_name
The pathname of the volume where the temporary object should be
created.
name_length
The number of bytes in volume_name.
start
The first byte of the object to map. To map from the beginning of
an object, provide a start value of 0.
desired_length
The number of bytes to map into the calling process' address space
for the temporary object.
concurrency
The concurrency mode for the object. Specify 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 writers.
status
The completion status. Ms_$crtemp returns with ms_$bad_access in
status when the value specified in concurrency is not one of the
legal ones defined above. Ms_$crtemp returns with ms_$in_use in
status when an object exists at name and is locked. Ms_$crtemp
returns with ms_$no_space in status when the calling process lacks
enough virtual address space to map the requested object.
NOTES
The ms_$mk_permanent call can make a temporary file permanent.
SEE ALSO
ms_$crmapl, ms_$mapl, ms_$mk_temporary, ms_$unmap.