Remote Shared Memory Library Functions
rsmmemsegimportputv(3RSM)
NAME
rsmmemsegimportputv, rsmmemsegimportgetv - write to a
segment using a list of I/O requests
SYNOPSIS
cc [ flag... ] file... -lrsm [ library... ]
#include
int rsmmemsegimportputv(rsmscatgatht *sgio);
int rsmmemsegimportgetv(rsmscatgatht *sgio);
DESCRIPTION
The rsmmemsegimportputv() and rsmmemsegimportgetv()
functions provide for using a list of I/O requests rather
than a single source and destination address as is done for
thersmmemsegimportput(3RSM) and
rsmmemsegimportget(3RSM) functions.
The I/O vector component of the scatter-gather list (sgio),
allows specifying local virtual addresses or
localmemoryhandles. When a local address range is used
repeatedly, it is efficient to use a handle because allo-
cated system resources (that is, locked down local memory)
are maintained until the handle is freed. The supporting
functions for handles are
rsmcreatelocalmemoryhandle(3RSM) and
rsmfreelocalmemoryhandle(3RSM).
Virtual addresses or handles may be gathered into the vector
for writing to a single remote segment, or a read from a
single remote segment may be scattered to the vector of vir-
tual addresses or handles.
Implicit mapping is supported for the scatter-gather type of
access. The attributes of the extension library for the
specific interconnect are used to determine whether mapping
is necessary before any scatter-gather access. If mapping of
the imported segment is a prerequisite for scatter-gather
access and the mapping has not already been performed, an
implicit mapping is performed for the imported segment. The
I/O for the vector is then initiated.
I/O for the entire vector is initiated before returning. The
barrier mode attribute of the import segment determines if
SunOS 5.11 Last change: 12 Nov 2001 1
Remote Shared Memory Library Functions
rsmmemsegimportputv(3RSM)
the I/O has completed before the function returns. A bar-
rier mode attribute setting of IMPLICIT guarantees that the
transfer of data is completed in the order as entered in the
I/O vector. An implicit barrier open and close surrounds
each list entry. If an error is detected, I/O for the vector
is terminated and the function returns immediately. The
residual count indicates the number of entries for which the
I/O either did not complete or was not initiated.
The number of entries in the I/O vector component of the
scatter-gather list is specified in the iorequestcount
field of the rsmscatgatht pointed to by sgio. The
iorequestcount is valid if greater than 0 and less than or
equal to RSMAXSGIOREQS. If iorequestcount is not in
the valid range, rsmmemsegimportputv() and
rsmmemsegimportgetv() returns RSMERBADSGIO.
Optionally, the scatter-gather list allows support for an
implicit signal post after the I/O for the entire vector has
completed. This alleviates the need to do an explicit signal
post after ever I/O transfer operation. The means of ena-
bling the implicit signal post involves setting the flags
field within the scatter-gather list to
RSMIMPLICITSIGPOST. The flags field may also be set to
RSMSIGPOSTNOACUMULATE, which will be passed on to the
signal post operation when RSMIMPLICITSIGPOST is set.
RETURN VALUES
Upon successful completion, these functions return 0. Other-
wise, an error value is returned to indicate the error.
ERORS
The rsmmemsegimportputv() and rsmmemsegimportgetv()
functions can return the following errors:
RSMERBADSGIO
Invalid scatter-gather structure pointer.
RSMERBADSEGHNDL
Invalid segment handle.
RSMERBADCTLRHNDL
Invalid controller handle.
SunOS 5.11 Last change: 12 Nov 2001 2
Remote Shared Memory Library Functions
rsmmemsegimportputv(3RSM)
RSMERBADOFSET
Invalid offset.
RSMERBADLENGTH
Invalid length.
RSMERBADADR
Bad address.
RSMERINSUFICIENTRESOURCES
Insufficient resources.
RSMERINTERUPTED
The operation was interrupted by a signal.
RSMERPERMDENIED
Permission denied.
RSMERBARIERFAILURE
I/O completion error.
RSMEREMOTENODEUNREACHABLE
Remote node not reachable.
ATRIBUTES
See attributes(5) for descriptions of the following attri-
butes:
SunOS 5.11 Last change: 12 Nov 2001 3
Remote Shared Memory Library Functions
rsmmemsegimportputv(3RSM)
ATRIBUTE TYPE ATRIBUTE VALUE
Interface Stability Evolving
MT-Level MT-Safe
SEE ALSO
rsmcreatelocalmemoryhandle(3RSM),
rsmfreelocalmemoryhandle(3RSM), attributes(5)
SunOS 5.11 Last change: 12 Nov 2001 4
Remote Shared Memory Library Functions
rsmmemsegimportputv(3RSM)
SunOS 5.11 Last change: 12 Nov 2001 5
|