2 .\" Copyright (c) 2001 by Sun Microsystems, Inc. All rights reserved.
3 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
4 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
5 .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
6 .TH RSM_CREATE_LOCALMEMORY_HANDLE 3RSM "Jun 8, 2001"
8 rsm_create_localmemory_handle, rsm_free_localmemory_handle \- create or free
13 cc [ \fIflag\fR... ] \fIfile\fR... -lrsm [ \fIlibrary\fR... ]
16 \fBint\fR \fBrsm_create_localmemory_handle\fR(
17 \fBrsmapi_controller_handle_t\fR \fIhandle\fR,
18 \fBrsm_localmemory_handle_t *\fR\fIl_handle\fR,
19 \fBcaddr_t\fR \fIlocal_vaddr\fR, \fBsize_t\fR \fIlength\fR);
24 \fBint\fR \fBrsm_free_localmemory_handle\fR(
25 \fBrsmapi_controller_handle_t\fR \fIhandle\fR,
26 \fBrsm_localmemory_handle_t\fR \fIl_handle\fR);
32 The \fBrsm_create_localmemory_handle()\fR and
33 \fBrsm_free_localmemory_handle()\fR functions are supporting functions for
34 \fBrsm_memseg_import_putv\fR(3RSM) and \fBrsm_memseg_import_getv\fR(3RSM).
37 The \fBrsm_create_localmemory_handle()\fR function creates a local memory
38 handle to be used in the I/O vector component of a scatter-gather list of
39 subsequent \fBrsm_memseg_import_putv()\fR and \fBrsm_memseg_import_getv()\fR
40 calls. The \fIhandle\fR argument specifies the controller handle obtained from
41 \fBrsm_get_controller\fR(3RSM). The \fIl_handle\fR argument is a pointer to the
42 location for the function to return the local memory handle. The
43 \fIlocal_vaddr\fR argument specifies the local virtual address; it should be
44 aligned at a page boundary. The \fIlength\fR argument specifies the length of
45 memory spanned by the handle.
48 The \fBrsm_free_localmemory_handle()\fR function unlocks the memory range for
49 the local handle specified by \fIl_handle\fR and releases the associated system
50 resources. The \fIhandle\fR argument specifies the controller handle. All
51 handles created by a process are freed when the process exits, but the process
52 should call \fBrsm_free_localmemory_handle()\fR as soon as possible to free the
57 Upon successful completion, these functions return 0. Otherwise, an error value
58 is returned to indicate the error.
62 The \fBrsm_create_localmemory_handle()\fR and
63 \fBrsm_free_localmemory_handle()\fR functions can return the following errors:
67 \fB\fBRSMERR_BAD_CTLR_HNDL\fR \fR
70 Invalid controller handle.
76 \fB\fBRSMERR_BAD_LOCALMEM_HNDL\fR \fR
79 Invalid local memory handle.
84 The \fBrsm_create_localmemory_handle()\fR function can return the following
89 \fB\fBRSMERR_BAD_LENGTH\fR \fR
98 \fB\fBRSMERR_BAD_ADDRESS\fR \fR
107 \fB\fBRSMERR_INSUFFICIENT_MEM\fR \fR
116 See \fBattributes\fR(5) for descriptions of the following attributes:
124 ATTRIBUTE TYPE ATTRIBUTE VALUE
126 Interface Stability Evolving
134 \fBrsm_memseg_import_putv\fR(3RSM), \fBattributes\fR(5)