1rsm_memseg_import_getR(e3mRoStMe)Shared Memory Library Funrcstmi_omnesmseg_import_get(3RSM)
2
3
4

NAME

6       rsm_memseg_import_get, rsm_memseg_import_get8, rsm_memseg_import_get16,
7       rsm_memseg_import_get32, rsm_memseg_import_get64 - read from a segment
8

SYNOPSIS

10       cc [ flag... ] file... -lrsm [ library... ]
11       #include <rsmapi.h>
12
13       int rsm_memseg_import_get(rsm_memseg_import_handle_t im_memseg,
14            off_t offset, void *dest_addr, size_t length);
15
16
17       int rsm_memseg_import_get8(rsm_memseg_import_handle_t im_memseg,
18            off_t offset, uint8_t *datap, ulong_t rep_cnt);
19
20
21       int rsm_memseg_import_get16(rsm_memseg_import_handle_t im_memseg,
22            off_t offset, uint16_t *datap, ulong_t rep_cnt);
23
24
25       int rsm_memseg_import_get32(rsm_memseg_import_handle_t im_memseg,
26            off_t offset, uint32_t *datap, ulong_t rep_cnt);
27
28
29       int rsm_memseg_import_get64(rsm_memseg_import_handle_t im_memseg,
30            off_t offset, uint64_t *datap, ulong_t rep_cnt);
31
32

DESCRIPTION

34       When using interconnects  that  allow  memory  mapping  (see   rsm_mem‐
35       seg_import_map(3RSM)),  standard  CPU memory operations may be used for
36       accessing memory of a segment. If  a  mapping  is  not  provided,  then
37       explicitly  calling these functions facilitates reading from a segment.
38       Depending on the attributes of the extension library  of  the  specific
39       interconnect,  these  functions may involve performing an implicit map‐
40       ping before performing the data  transfer.  Applications  can  be  made
41       interconnect-independent  with  respect to segment reads by using these
42       functions. The data access error detection is performed through the use
43       of  barriers  (see  rsm_memseg_import_open_barrier(3RSM)).  The default
44       barrier  operation  mode  is  RSM_BARRIER_MODE_IMPLICIT,  meaning  that
45       around  every  get operation open and close barrier are performed auto‐
46       matically. Alternatively, explicit error handling may  be  set  up  for
47       these  functions (see rsm_memseg_import_set_mode(3RSM)). In either case
48       the barrier should be initialized prior to using these  functions using
49       rsm_memseg_import_init_barrier(3RSM).
50
51
52       The  rsm_memseg_import_get()  function  copies  length  bytes  from the
53       imported segment im_memseg beginning at location offset from the  start
54       of the segment to a local memory buffer pointed to by dest_addr.
55
56
57       The  rsm_memseg_import_get8()  function  copies rep_cnt number of 8-bit
58       quantities from  successive  locations  starting  from  offset  in  the
59       imported  segment  to  successive  local memory locations pointed to by
60       datap.
61
62
63       The rsm_memseg_import_get16() functions copies rep_cnt number of 16-bit
64       quantities  from  successive  locations  starting  from  offset  in the
65       imported segment to successive local memory  locations  pointed  to  by
66       datap. The offset must be aligned at half-word address boundary.
67
68
69       The  rsm_memseg_import_get32() function copies rep_cnt number of 32-bit
70       quantities from  successive  locations  starting  from  offset  in  the
71       imported  segment  to  successive  local memory locations pointed to by
72       datap. The offset must be aligned at word address boundary.
73
74
75       The rsm_memseg_import_get64() function copies rep_cnt  number  of  -bit
76       quantities  from  successive  locations  starting  from  offset  in the
77       imported segment to successive local memory  locations  pointed  to  by
78       datap. The offset must be aligned at double-word address boundary.
79
80
81       The  data  transfer  functions  that  transfer small quantities of data
82       (that is, 8-, 16-, 32-, and 64-bit quantities)  perform  byte  swapping
83       prior  to  the data transfer, in the event that the source and destina‐
84       tion have incompatible endian characteristics.
85

RETURN VALUES

87       Upon successful completion, these functions  return  0.  Otherwise,  an
88       error value is returned to indicate the error.
89

ERRORS

91       These functions can return the following errors:
92
93       RSMERR_BAD_SEG_HNDL
94
95           Invalid segment handle.
96
97
98       RSMERR_BAD_ADDR
99
100           Bad address.
101
102
103       RSMERR_BAD_MEM_ALIGNMENT
104
105           Invalid memory alignment for pointer.
106
107
108       RSMERR_BAD_OFFSET
109
110           Invalid offset.
111
112
113       RSMERR_BAD_LENGTH
114
115           Invalid length.
116
117
118       RSMERR_PERM_DENIED
119
120           Permission denied.
121
122
123       RSMERR_INSUFFICIENT_RESOURCES
124
125           Insufficient resources.
126
127
128       RSMERR_BARRIER_UNINITIALIZED
129
130           Barrier not initialized.
131
132
133       RSMERR_BARRIER_FAILURE
134
135           I/O completion error.
136
137
138       RSMERR_CONN_ABORTED
139
140           Connection aborted.
141
142

ATTRIBUTES

144       See attributes(5) for descriptions of the following attributes:
145
146
147
148
149       ┌─────────────────────────────┬─────────────────────────────┐
150ATTRIBUTE TYPE               ATTRIBUTE VALUE              
151       ├─────────────────────────────┼─────────────────────────────┤
152       │Interface Stability          │Evolving                     │
153       ├─────────────────────────────┼─────────────────────────────┤
154       │MT-Level                     │MT-Safe                      │
155       └─────────────────────────────┴─────────────────────────────┘
156

SEE ALSO

158       rsm_memseg_import_init_barrier(3RSM),       rsm_memseg_import_open_bar‐
159       rier(3RSM), rsm_memseg_import_set_mode(3RSM), attributes(5)
160
161
162
163SunOS 5.11                        8 Jun 2001       rsm_memseg_import_get(3RSM)
Impressum