1rsm_memseg_import_mapR(e3mRoStMe)Shared Memory Library Funrcstmi_omnesmseg_import_map(3RSM)
2
3
4
6 rsm_memseg_import_map, rsm_memseg_import_unmap - map or unmap imported
7 segment
8
10 cc [ flag... ] file... -lrsm [ library... ]
11 #include <rsmapi.h>
12
13 int rsm_memseg_import_map(rsm_memseg_import_handle_t im_memseg,
14 void **address, rsm_attribute_t attr,
15 rsm_permission_t perm, off_t offset, size_t length);
16
17
18 int rsm_memseg_import_unmap(rsm_memseg_import_handle_t im_memseg);
19
20
22 The rsm_memseg_import_map() and rsm_memseg_import_unmap() functions
23 provide for mapping and unmapping operations on imported segments. The
24 mapping operations are only available for native architecture intercon‐
25 nects such as Dolphin-SCI or Sun Fire Link. Mapping a segment allows
26 that segment to be accessed by CPU memory operations, saving the over‐
27 head of calling the memory access primitives described on the rsm_mem‐
28 seg_import_get(3RSM) and rsm_memseg_import_put(3RSM) manual pages.
29
30
31 The rsm_memseg_import_map() function maps an import segment into call‐
32 er's address space for the segment to be accessed by CPU memory opera‐
33 tions. The im_memseg argument represents the import segment that is
34 being mapped. The location where the process's address space is mapped
35 to the segment is pointed to by the address argument. The attr argi‐
36 ment can be one fo the following:
37
38 RSM_MAP_NONE The system will choose available virtual address to
39 map and return its value in the address argument.
40
41
42 RSM_MAP_FIXED The import segment should be mapped at the requested
43 virtual address specified in the address argument.
44
45
46
47 The perm argument determines whether read, write or a combination of
48 accesses are permitted to the data being mapped. It can be either
49 RSM_PERM_READ, RSM_PERM_WRITE, or RSM_PERM_RDWR.
50
51
52 The offset argument is the byte offset location from the base of the
53 segment being mapped to address. The length argument indicates the num‐
54 ber of bytes from offset to be mapped.
55
56
57 The rsm_memseg_import_unmap() function unmaps a previously mapped
58 import segment.
59
61 Upon successful completion, these functions return 0. Otherwise, an
62 error value is returned to indicate the error.
63
65 The rsm_memseg_import_map() and rsm_memseg_import_unmap() functions can
66 return the following errors:
67
68 RSMERR_BAD_SEG_HNDL Invalid segment handle.
69
70
71
72 The rsm_memseg_import_map() function can return the following errors:
73
74 RSMERR_BAD_ADDR Invalid address.
75
76
77 RSMERR_BAD_LENGTH Invalid length.
78
79
80 RSMERR_BAD_MEM_ALIGNMENT The address is not aligned on a page
81 boundary.
82
83
84 RSMERR_BAD_OFFSET Invalid offset.
85
86
87 RSMERR_BAD_PERMS Invalid permissions.
88
89
90 RSMERR_CONN_ABORTED Connection aborted.
91
92
93 RSMERR_MAP_FAILED Map failure.
94
95
96 RSMERR_SEG_ALREADY_MAPPED Segment already mapped.
97
98
99 RSMERR_SEG_NOT_CONNECTED Segment not connected.
100
101
103 See attributes(5) for descriptions of the following attributes:
104
105
106
107
108 ┌─────────────────────────────┬─────────────────────────────┐
109 │ATTRIBUTE TYPE │ATTRIBUTE VALUE │
110 ├─────────────────────────────┼─────────────────────────────┤
111 │Interface Stability │Evolving │
112 ├─────────────────────────────┼─────────────────────────────┤
113 │MT-Level │MT-Safe │
114 └─────────────────────────────┴─────────────────────────────┘
115
117 rsm_memseg_import_connect(3RSM), rsm_memseg_import_get(3RSM), rsm_mem‐
118 seg_import_put(3RSM), rsm_memseg_get_pollfd(3RSM), attributes(5)
119
120
121
122SunOS 5.11 13 Nov 2002 rsm_memseg_import_map(3RSM)