rsm_free_localmemory_handle(3rsm) [sunos man page]
rsm_create_localmemory_handle(3RSM) Remote Shared Memory Library Functions rsm_create_localmemory_handle(3RSM) NAME
rsm_create_localmemory_handle, rsm_free_localmemory_handle - create or free local memory handle SYNOPSIS
cc [ flag... ] file... -lrsm [ library... ] #include <rsmapi.h> int rsm_create_localmemory_handle(rsmapi_controller_handle_t handle, rsm_localmemory_handle_t *l_handle, caddr_t local_vaddr, size_t length); int rsm_free_localmemory_handle(rsmapi_controller_handle_t handle, rsm_localmemory_handle_t l_handle); DESCRIPTION
The rsm_create_localmemory_handle() and rsm_free_localmemory_handle() functions are supporting functions for rsm_memseg_import_putv(3RSM) and rsm_memseg_import_getv(3RSM). The rsm_create_localmemory_handle() function creates a local memory handle to be used in the I/O vector component of a scatter-gather list of subsequent rsm_memseg_import_putv() and rsm_memseg_import_getv() calls. The handle argument specifies the controller handle obtained from rsm_get_controller(3RSM). The l_handle argument is a pointer to the location for the function to return the local memory handle. The local_vaddr 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 handle. The rsm_free_localmemory_handle() function unlocks the memory range for the local handle specified by l_handle and releases the associated system resources. The handle argument specifies the controller handle. All handles created by a process are freed when the process exits, but the process should call rsm_free_localmemory_handle() as soon as possible to free the system resources. RETURN VALUES
Upon successful completion, these functions return 0. Otherwise, an error value is returned to indicate the error. ERRORS
The rsm_create_localmemory_handle() and rsm_free_localmemory_handle() functions can return the following errors: RSMERR_BAD_CTLR_HNDL Invalid controller handle. RSMERR_BAD_LOCALMEM_HNDL Invalid local memory handle. The rsm_create_localmemory_handle() function can return the following errors: RSMERR_BAD_LENGTH Invalid length. RSMERR_BAD_ADDRESS Invalid address. RSMERR_INSUFFICIENT_MEM Insufficient memory. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Interface Stability |Evolving | +-----------------------------+-----------------------------+ |MT-Level |MT-Safe | +-----------------------------+-----------------------------+ SEE ALSO
rsm_memseg_import_putv(3RSM), attributes(5) SunOS 5.10 8 Jun 2001 rsm_create_localmemory_handle(3RSM)
Check Out this Related Man Page
rsm_memseg_import_putv(3RSM) Remote Shared Memory Library Functions rsm_memseg_import_putv(3RSM) NAME
rsm_memseg_import_putv, rsm_memseg_import_getv - write to a segment using a list of I/O requests SYNOPSIS
cc [ flag... ] file... -lrsm [ library... ] #include <rsmapi.h> int rsm_memseg_import_putv(rsm_scat_gath_t *sg_io); int rsm_memseg_import_getv(rsm_scat_gath_t *sg_io); DESCRIPTION
The rsm_memseg_import_putv() and rsm_memseg_import_getv() functions provide for using a list of I/O requests rather than a single source and destination address as is done for thersm_memseg_import_put(3RSM) and rsm_memseg_import_get(3RSM) functions. The I/O vector component of the scatter-gather list (sg_io), allows specifying local virtual addresses or local_memory_handles. When a local address range is used repeatedly, it is efficient to use a handle because allocated system resources (that is, locked down local mem- ory) are maintained until the handle is freed. The supporting functions for handles are rsm_create_localmemory_handle(3RSM) and rsm_free_localmemory_handle(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 virtual 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 the I/O has com- pleted before the function returns. A barrier 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 vec- tor 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 io_request_count field of the rsm_scat_gath_t pointed to by sg_io. The io_request_count is valid if greater than 0 and less than or equal to RSM_MAX_SGIOREQS. If io_request_count is not in the valid range, rsm_memseg_import_putv() and rsm_memseg_import_getv() returns RSMERR_BAD_SGIO. 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 enabling the implicit signal post involves setting the flags field within the scatter-gather list to RSM_IMPLICIT_SIGPOST. The flags field may also be set to RSM_SIG_POST_NO_ACCUMULATE, which will be passed on to the signal post operation when RSM_IMPLICIT_SIGPOST is set. RETURN VALUES
Upon successful completion, these functions return 0. Otherwise, an error value is returned to indicate the error. ERRORS
The rsm_memseg_import_putv() and rsm_memseg_import_getv() functions can return the following errors: RSMERR_BAD_SGIO Invalid scatter-gather structure pointer. RSMERR_BAD_SEG_HNDL Invalid segment handle. RSMERR_BAD_CTLR_HNDL Invalid controller handle. RSMERR_BAD_OFFSET Invalid offset. RSMERR_BAD_LENGTH Invalid length. RSMERR_BAD_ADDR Bad address. RSMERR_INSUFFICIENT_RESOURCES Insufficient resources. RSMERR_INTERRUPTED The operation was interrupted by a signal. RSMERR_PERM_DENIED Permission denied. RSMERR_BARRIER_FAILURE I/O completion error. RSMERR_REMOTE_NODE_UNREACHABLE Remote node not reachable. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Interface Stability |Evolving | +-----------------------------+-----------------------------+ |MT-Level |MT-Safe | +-----------------------------+-----------------------------+ SEE ALSO
rsm_create_localmemory_handle(3RSM), rsm_free_localmemory_handle(3RSM), attributes(5) SunOS 5.10 12 Nov 2001 rsm_memseg_import_putv(3RSM)