Mapping operations are only available for native architecture interconnects such as Dolphin-SCI or NewLink. Mapping a segment grants CPU memory operations access to that segment, saving the overhead of calling memory access primitives.
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);This function maps an imported segment into the caller address space. If the attribute RSM_MAP_FIXED is specified, the function maps the segment at the value specified in **address.
typedef enum { RSM_MAP_NONE = 0x0, /* system will choose available virtual address */ RSM_MAP_FIXED = 0x1, /* map segment at specified virtual address */ } rsm_map_attr_t;
Return Values: Returns 0 if successful. Returns an error value otherwise.
Invalid segment handle
Invalid address
Invalid length
Invalid offset
Invalid permissions
Segment already mapped
Segment not connected
Connection aborted
Error during mapping
Address not aligned on page boundary
This function unmaps an imported segment from user virtual address space.
Return Values: Returns 0 if successful. Returns an error value otherwise.
Invalid segment handle