Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ maus(2) — Ultrix-11 3.0

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

maus(4)

maus(2)

NAME

maus − multiple-access-user-space (shared memory) operations

SYNTAX

#include <fcntl.h>

int getmaus(path, oflag)
char *path;
int oflag;

int freemaus(mausdes)
int mausdes;

char *enabmaus(mausdes)
int mausdes;

int dismaus(saddr)
char *saddr;

int switmaus(mausdes, saddr)
int mausdes;
char *saddr;

DESCRIPTION

MAUS (Multiple Access User Space) is a dedicated portion of physical memory that is subdivided into logical subsections.  These subsections can be attached to the data segment of the calling process or released from its data segment with the following calls. 

The getmaus call opens a maus descriptor for the named file and sets the file status flag according to the value of oflag. The specified path points to a path name which names a special file that is one of the MAUS logical subsections.  For further information, see maus(4).  The specified oflag can be one of the following:

O_RDONLY   Open for reading only
O_WRONLY   Open for writing only
O_RDWR     Open for reading and writing

No process can have more than eight (8) maus descriptors open simultaneously.

The freemaus call closes the maus descriptor specified by mausdes.  If a maus descriptor has been enabled, it may still be closed.  A MAUS file remains attached to a data segment of the process until a dismaus is used to free it. 

The enabmaus call attaches the MAUS file associated with mausdes to the data segment of the calling process.  The file is attached starting at the first available 8k-byte boundary address beyond the current break value.  For further information, see brk(2).  Multiple enabmaus calls can be made with the same maus descriptor.  Each call will attach the file at a different 8k-byte boundary address. 

The dismaus call frees from the calling process’s data segment the MAUS file that starts at the data segment address given by ( saddr  − ( saddr modulus 8192)). 

The switmaus call attaches the MAUS file associated with mausdes to the data segment of the calling process.  The file is attached starting at the address given by (saddr − (saddr modulus 8192)). 

RETURN VALUES

Upon successful completion, the return value is as follows:

•The getmaus call returns a maus descriptor (non-negative integer). 

•The freemaus call returns a value of 0. 

•The enabmaus call returns the data segment starting address of the attached MAUS file. 

•The dismaus and switmaus calls return the maus descriptor previously associated with the data segment starting address given by ( saddr  − ( saddr modulus 8192)) if one exists.  Otherwise, a value of −2 is returned. 

If unsuccessful, all calls return a −1, and the global variable errno indicates the error code. 

DIAGNOSTICS

The getmaus call will fail if:

[ENOTDIR] A component of the path prefix is not a directory. 

[ENOENT] The named file does not exist. 

[EINVAL] The named file is not a maus special file. 

[EACCES] A component of the path prefix denies search permission. 

[EACCES] The oflag permission is denied for the named file. 

[EMFILE] Eight (8) maus descriptors are currently open. 

[ENXIO] The MAUS area associated with the special file does not exist. 

[EFAULT] The specified path points to an illegal address. 

The freemaus call will fail if:

[EBADF] The specified mausdes is not a valid open maus descriptor. 

The enabmaus call will fail if:

[EBADF] The specified mausdes is not a valid open maus descriptor. 

[ENOMEM] No more 8k-byte boundary starting addresses are available. 

The

The switmaus call will fail if:

SEE ALSO

maus(4)

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