Remote Shared Memory Library Functions
rsmmemsegimportmap(3RSM)
NAME
rsmmemsegimportmap, rsmmemsegimportunmap - map or
unmap imported segment
SYNOPSIS
cc [ flag... ] file... -lrsm [ library... ]
#include
int rsmmemsegimportmap(rsmmemsegimporthandlet immemseg,
void **address, rsmattributet attr,
rsmpermissiont perm, offt offset, sizet length);
int rsmmemsegimportunmap(rsmmemsegimporthandlet immemseg);
DESCRIPTION
The rsmmemsegimportmap() and rsmmemsegimportunmap()
functions provide for mapping and unmapping operations on
imported segments. The mapping operations are only available
for native architecture interconnects such as Dolphin-SCI or
Sun Fire Link. Mapping a segment allows that segment to be
accessed by CPU memory operations, saving the overhead of
calling the memory access primitives described on the
rsmmemsegimportget(3RSM) and rsmmemsegimportput(3RSM)
manual pages.
The rsmmemsegimportmap() function maps an import segment
into caller's address space for the segment to be accessed
by CPU memory operations. The immemseg argument represents
the import segment that is being mapped. The location where
the process's address space is mapped to the segment is
pointed to by the address argument. The attr argiment can
be one fo the following:
RSMAPNONE The system will choose available virtual
address to map and return its value in the
address argument.
RSMAPFIXED The import segment should be mapped at the
requested virtual address specified in the
address argument.
The perm argument determines whether read, write or a combi-
nation of accesses are permitted to the data being mapped.
It can be either RSMPERMREAD, RSMPERMWRITE, or
RSMPERMRDWR.
SunOS 5.11 Last change: 13 Nov 2002 1
Remote Shared Memory Library Functions
rsmmemsegimportmap(3RSM)
The offset argument is the byte offset location from the
base of the segment being mapped to address. The length
argument indicates the number of bytes from offset to be
mapped.
The rsmmemsegimportunmap() function unmaps a previously
mapped import segment.
RETURN VALUES
Upon successful completion, these functions return 0. Other-
wise, an error value is returned to indicate the error.
ERORS
The rsmmemsegimportmap() and rsmmemsegimportunmap()
functions can return the following errors:
RSMERBADSEGHNDL Invalid segment handle.
The rsmmemsegimportmap() function can return the follow-
ing errors:
RSMERBADADR Invalid address.
RSMERBADLENGTH Invalid length.
RSMERBADMEMALIGNMENT The address is not aligned on
a page boundary.
RSMERBADOFSET Invalid offset.
RSMERBADPERMS Invalid permissions.
RSMERCONABORTED Connection aborted.
RSMERMAPFAILED Map failure.
RSMERSEGALREADYMAPED Segment already mapped.
RSMERSEGNOTCONECTED Segment not connected.
SunOS 5.11 Last change: 13 Nov 2002 2
Remote Shared Memory Library Functions
rsmmemsegimportmap(3RSM)
ATRIBUTES
See attributes(5) for descriptions of the following attri-
butes:
ATRIBUTE TYPE ATRIBUTE VALUE
Interface Stability Evolving
MT-Level MT-Safe
SEE ALSO
rsmmemsegimportconnect(3RSM),
rsmmemsegimportget(3RSM), rsmmemsegimportput(3RSM),
rsmmemseggetpollfd(3RSM), attributes(5)
SunOS 5.11 Last change: 13 Nov 2002 3
Remote Shared Memory Library Functions
rsmmemsegimportmap(3RSM)
SunOS 5.11 Last change: 13 Nov 2002 4
|