Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

MS_$CRMAPL                        Domain/OS                         MS_$CRMAPL


NAME
     ms_$crmapl - create, map, and lock an object

SYNOPSIS (C)
     #include <apollo/base.h>
     #include <apollo/ms.h>

     void *ms_$crmapl(
          char *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_$crmapl(
          in 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 name*1023

           integer*4 address, dummy
           pointer /address/ dummy

           address = ms_$crmapl(name, name_length, start, desired_length,
          &                     concurrency, status)

DESCRIPTION
     This call maps the object at name or creates an object at name and maps
     it if one does not already exist.  It returns a pointer to the mapped
     portion of the object.

     Ms_$crmapl 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.

     name The pathname of the object to be mapped.  If no object exists at
          name, one is created.

     name_length
          The number of bytes in 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 in the object to map.

     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_$crmapl returns with ms_$bad_access in
          status when the value specified in concurrency is not one of the
          legal ones defined above.  Ms_$crmapl returns with ms_$in_use in
          status when an object exists at name and is locked.  Ms_$crmapl
          returns with ms_$no_space in status when the calling process lacks
          enough virtual address space to map the requested object.

SEE ALSO
     ms_$crtemp, ms_$mapl, ms_$mapl_stream, ms_$unmap.

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026