Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

rsm_memseg_import_map(3rsm) [opensolaris man page]

rsm_memseg_import_map(3RSM)			      Remote Shared Memory Library Functions			       rsm_memseg_import_map(3RSM)

NAME
rsm_memseg_import_map, rsm_memseg_import_unmap - map or unmap imported segment SYNOPSIS
cc [ flag... ] file... -lrsm [ library... ] #include <rsmapi.h> int rsm_memseg_import_map(rsm_memseg_import_handle_t im_memseg, void **address, rsm_attribute_t attr, rsm_permission_t perm, off_t offset, size_t length); int rsm_memseg_import_unmap(rsm_memseg_import_handle_t im_memseg); DESCRIPTION
The rsm_memseg_import_map() and rsm_memseg_import_unmap() 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 rsm_mem- seg_import_get(3RSM) and rsm_memseg_import_put(3RSM) manual pages. The rsm_memseg_import_map() function maps an import segment into caller's address space for the segment to be accessed by CPU memory opera- tions. The im_memseg 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: RSM_MAP_NONE The system will choose available virtual address to map and return its value in the address argument. RSM_MAP_FIXED 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 combination of accesses are permitted to the data being mapped. It can be either RSM_PERM_READ, RSM_PERM_WRITE, or RSM_PERM_RDWR. 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 rsm_memseg_import_unmap() function unmaps a previously mapped import segment. RETURN VALUES
Upon successful completion, these functions return 0. Otherwise, an error value is returned to indicate the error. ERRORS
The rsm_memseg_import_map() and rsm_memseg_import_unmap() functions can return the following errors: RSMERR_BAD_SEG_HNDL Invalid segment handle. The rsm_memseg_import_map() function can return the following errors: RSMERR_BAD_ADDR Invalid address. RSMERR_BAD_LENGTH Invalid length. RSMERR_BAD_MEM_ALIGNMENT The address is not aligned on a page boundary. RSMERR_BAD_OFFSET Invalid offset. RSMERR_BAD_PERMS Invalid permissions. RSMERR_CONN_ABORTED Connection aborted. RSMERR_MAP_FAILED Map failure. RSMERR_SEG_ALREADY_MAPPED Segment already mapped. RSMERR_SEG_NOT_CONNECTED Segment not connected. 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_connect(3RSM), rsm_memseg_import_get(3RSM), rsm_memseg_import_put(3RSM), rsm_memseg_get_pollfd(3RSM), attributes(5) SunOS 5.11 13 Nov 2002 rsm_memseg_import_map(3RSM)

Check Out this Related Man Page

rsm_memseg_import_put(3RSM)			      Remote Shared Memory Library Functions			       rsm_memseg_import_put(3RSM)

NAME
rsm_memseg_import_put, rsm_memseg_import_put8, rsm_memseg_import_put16, rsm_memseg_import_put32, rsm_memseg_import_put64 - write to a seg- ment SYNOPSIS
cc [ flag... ] file... -lrsm [ library... ] #include <rsmapi.h> int rsm_memseg_import_put(rsm_memseg_import_handle_t im_memseg, off_t offset, void *src_addr, size_t length); int rsm_memseg_import_put8(rsm_memseg_import_handle_t im_memseg, off_t offset, uint8_t datap, ulong_t rep_cnt); int rsm_memseg_import_put16(rsm_memseg_import_handle_t im_memseg, off_t offset, uint16_t datap, ulong_t rep_cnt); int rsm_memseg_import_put32(rsm_memseg_import_handle_t im_memseg, off_t offset, uint32_t datap, ulong_t rep_cnt); int rsm_memseg_import_put64(rsm_memseg_import_handle_t im_memseg, off_t offset, uint64_t datap, ulong_t rep_cnt); DESCRIPTION
When using interconnects that allow memory mapping (see rsm_memseg_import_map(3RSM)), standard CPU memory operations may be used for accessing memory of a segment. If, however, a mapping is not provided, then explicitly calling these functions facilitates writing to a segment. Depending on the attributes of the extension library for the interconnect, these functions may involve doing an implicit mapping before performing the data transfer. Applications can be made interconnect-independent with respect to segment writes by using these func- tions. The data access error detection is performed through the use of barriers (see rsm_memseg_import_open_barrier(3RSM)). The default barrier operation mode is RSM_BARRIER_MODE_IMPLICIT, which means that around every put operation open and close barrier operations are per- formed automatically. Explicit error handling may also be set up for these functions (see rsm_memseg_import_set_mode(3RSM)). The rsm_memseg_import_put() function copies length bytes from local memory with start address src_addr to the imported segment im_memseg beginning at location offset from the start of the segment. The rsm_memseg_import_put8() function copies rep_cnt number of 8-bit quantities from successive local memory locations pointed to by datap to successive locations starting from offset in the imported segment. The rsm_memseg_import_put16() function copies rep_cnt number of 16-bit quantities from successive local memory locations pointed to by datap to successive locations starting from offset in the imported segment. The offset must be aligned at half-word address boundary. The rsm_memseg_import_put32() function copies rep_cnt number of 32-bit quantities from successive local memory locations pointed to by datap to successive locations starting from offset in the imported segment. The offset must be aligned at word address boundary. The rsm_memseg_import_put64() function copies rep_cnt number of 64-bit quantities from successive local memory locations pointed to by datap to successive locations starting from offset in the imported segment. The offset must be aligned at double-word address boundary. The data transfer functions that transfer small quantities of data (that is, 8-, 16-, 32-, and 64-bit quantities) perform byte swapping prior to the data transfer, in the event that the source and destination have incompatible endian characteristics. RETURN VALUES
Upon successful completion, these functions return 0. Otherwise, an error value is returned to indicate the error. ERRORS
These functions can return the following errors: RSMERR_BAD_SEG_HNDL Invalid segment handle. RSMERR_BAD_ADDR Bad address. RSMERR_BAD_MEM_ALIGNMENT Invalid memory alignment for pointer. RSMERR_BAD_OFFSET Invalid offset. RSMERR_BAD_LENGTH Invalid length. RSMERR_PERM_DENIED Permission denied. RSMERR_INSUFFICIENT_RESOURCES Insufficient resources. RSMERR_BARRIER_UNINITIALIZED Barrier not initialized. RSMERR_BARRIER_FAILURE I/O completion error. RSMERR_CONN_ABORTED Connection aborted. 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_get(3RSM), rsm_memseg_import_init_barrier(3RSM), rsm_memseg_import_open_barrier(3RSM), rsm_memseg_import_set_mode(3RSM), attributes(5) SunOS 5.10 8 Jun 2001 rsm_memseg_import_put(3RSM)
Man Page