1rsm_memseg_import_putR(e3mRoStMe)Shared Memory Library Funrcstmi_omnesmseg_import_put(3RSM)
2
3
4

NAME

6       rsm_memseg_import_put, rsm_memseg_import_put8, rsm_memseg_import_put16,
7       rsm_memseg_import_put32, rsm_memseg_import_put64 - write to a segment
8

SYNOPSIS

10       cc [ flag... ] file... -lrsm [ library... ]
11       #include <rsmapi.h>
12
13       int rsm_memseg_import_put(rsm_memseg_import_handle_t im_memseg,
14            off_t offset, void *src_addr, size_t length);
15
16
17       int rsm_memseg_import_put8(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_put16(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_put32(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_put64(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, however, a mapping is not  provided,
37       then  explicitly  calling these functions facilitates writing to a seg‐
38       ment. Depending on the attributes of  the  extension  library  for  the
39       interconnect,  these  functions  may  involve doing an implicit mapping
40       before performing the data transfer. Applications can be made intercon‐
41       nect-independent  with  respect  to segment writes by using these func‐
42       tions. The data access error detection is performed through the use  of
43       barriers  (see  rsm_memseg_import_open_barrier(3RSM)). The default bar‐
44       rier operation mode  is  RSM_BARRIER_MODE_IMPLICIT,  which  means  that
45       around  every  put operation open and close barrier operations are per‐
46       formed automatically. Explicit error handling may also be  set  up  for
47       these functions (see rsm_memseg_import_set_mode(3RSM)).
48
49
50       The   rsm_memseg_import_put()  function  copies length bytes from local
51       memory with start address  src_addr to the imported  segment  im_memseg
52       beginning at location offset from the start of the segment.
53
54
55       The  rsm_memseg_import_put8()  function  copies rep_cnt number of 8-bit
56       quantities from successive local memory locations pointed to  by  datap
57       to successive locations starting from offset in the imported segment.
58
59
60       The  rsm_memseg_import_put16() function copies rep_cnt number of 16-bit
61       quantities from successive local memory locations pointed to  by  datap
62       to  successive  locations starting from offset in the imported segment.
63       The offset must be aligned at half-word address boundary.
64
65
66       The rsm_memseg_import_put32() function copies rep_cnt number of  32-bit
67       quantities  from  successive local memory locations pointed to by datap
68       to successive locations starting from offset in the  imported  segment.
69       The offset must be aligned at word address boundary.
70
71
72       The  rsm_memseg_import_put64() function copies rep_cnt number of 64-bit
73       quantities from successive local memory locations pointed to  by  datap
74       to  successive  locations starting from offset in the imported segment.
75       The offset must be aligned at double-word address boundary.
76
77
78       The data transfer functions that  transfer  small  quantities  of  data
79       (that  is,  8-,  16-, 32-, and 64-bit quantities) perform byte swapping
80       prior to the data transfer, in the event that the source  and  destina‐
81       tion have incompatible endian characteristics.
82

RETURN VALUES

84       Upon  successful  completion,  these  functions return 0. Otherwise, an
85       error value is returned to indicate the error.
86

ERRORS

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

ATTRIBUTES

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

SEE ALSO

155       rsm_memseg_import_get(3RSM),      rsm_memseg_import_init_barrier(3RSM),
156       rsm_memseg_import_open_barrier(3RSM), rsm_memseg_import_set_mode(3RSM),
157       attributes(5)
158
159
160
161SunOS 5.11                        8 Jun 2001       rsm_memseg_import_put(3RSM)
Impressum