Remote Shared Memory Library Functions
rsmcreatelocalmemoryhandle(3RSM)
NAME
rsmcreatelocalmemoryhandle, rsmfreelocalmemoryhandle -
create or free local memory handle
SYNOPSIS
cc [ flag... ] file... -lrsm [ library... ]
#include
int rsmcreatelocalmemoryhandle(
rsmapicontrollerhandlet handle,
rsmlocalmemoryhandlet *lhandle,
caddrt localvaddr, sizet length);
int rsmfreelocalmemoryhandle(
rsmapicontrollerhandlet handle,
rsmlocalmemoryhandlet lhandle);
DESCRIPTION
The rsmcreatelocalmemoryhandle() and
rsmfreelocalmemoryhandle() functions are supporting func-
tions for rsmmemsegimportputv(3RSM) and
rsmmemsegimportgetv(3RSM).
The rsmcreatelocalmemoryhandle() function creates a local
memory handle to be used in the I/O vector component of a
scatter-gather list of subsequent rsmmemsegimportputv()
and rsmmemsegimportgetv() calls. The handle argument
specifies the controller handle obtained from
rsmgetcontroller(3RSM). The lhandle argument is a pointer
to the location for the function to return the local memory
handle. The localvaddr argument specifies the local virtual
address; it should be aligned at a page boundary. The length
argument specifies the length of memory spanned by the han-
dle.
The rsmfreelocalmemoryhandle() function unlocks the
memory range for the local handle specified by lhandle and
releases the associated system resources. The handle argu-
ment specifies the controller handle. All handles created
by a process are freed when the process exits, but the pro-
cess should call rsmfreelocalmemoryhandle() as soon as
possible to free the system resources.
RETURN VALUES
Upon successful completion, these functions return 0. Other-
wise, an error value is returned to indicate the error.
SunOS 5.11 Last change: 8 Jun 2001 1
Remote Shared Memory Library Functions
rsmcreatelocalmemoryhandle(3RSM)
ERORS
The rsmcreatelocalmemoryhandle() and
rsmfreelocalmemoryhandle() functions can return the fol-
lowing errors:
RSMERBADCTLRHNDL Invalid controller handle.
RSMERBADLOCALMEMHNDL Invalid local memory handle.
The rsmcreatelocalmemoryhandle() function can return the
following errors:
RSMERBADLENGTH Invalid length.
RSMERBADADRES Invalid address.
RSMERINSUFICIENTMEM Insufficient memory.
ATRIBUTES
See attributes(5) for descriptions of the following attri-
butes:
ATRIBUTE TYPE ATRIBUTE VALUE
Interface Stability Evolving
MT-Level MT-Safe
SEE ALSO
rsmmemsegimportputv(3RSM), attributes(5)
SunOS 5.11 Last change: 8 Jun 2001 2
Remote Shared Memory Library Functions
rsmcreatelocalmemoryhandle(3RSM)
SunOS 5.11 Last change: 8 Jun 2001 3
|