2 * This Cplant(TM) source code is the property of Sandia National
5 * This Cplant(TM) source code is copyrighted by Sandia National
8 * The redistribution of this Cplant(TM) source code is subject to the
9 * terms of the GNU Lesser General Public License
10 * (see cit/LGPL or http://www.gnu.org/licenses/lgpl.html)
12 * Cplant(TM) Copyright 1998-2004 Sandia Corporation.
13 * Under the terms of Contract DE-AC04-94AL85000, there is a non-exclusive
14 * license for use of this work by or on behalf of the US Government.
15 * Export of this program may require a license from the United States
20 * This library is free software; you can redistribute it and/or
21 * modify it under the terms of the GNU Lesser General Public
22 * License as published by the Free Software Foundation; either
23 * version 2.1 of the License, or (at your option) any later version.
25 * This library is distributed in the hope that it will be useful,
26 * but WITHOUT ANY WARRANTY; without even the implied warranty of
27 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
28 * Lesser General Public License for more details.
30 * You should have received a copy of the GNU Lesser General Public
31 * License along with this library; if not, write to the Free Software
32 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
34 * Questions or comments about this library should be sent to:
37 * Sandia National Laboratories, New Mexico
39 * Albuquerque, NM 87185-1110
45 * Extended application programmers interface for IO as found on Cray RedStorm
46 * and the other current SUNMos/Puma/Cougar/Catamount systems.
52 #ifndef _IOID_T_DEFINED
53 #define _IOID_T_DEFINED
60 * Structure for strided I/O.
63 #ifndef __USE_FILE_OFFSET64
64 __off_t xtv_off; /* Stride/Extent offset. */
66 __off64_t xtv_off; /* Stride/Extent offset. */
68 size_t xtv_len; /* Stride/Extent length. */
71 #ifdef __USE_LARGEFILE64
73 __off64_t xtv_off; /* Stride/Extent offset. */
74 size_t xtv_len; /* Stride/Extent length. */
81 * Get status of previously posted async file IO operation.
83 extern int iodone(ioid_t ioid);
86 * Wait for completion of a previously posted asynch file IO request.
88 extern ssize_t iowait(ioid_t ioid);
91 * Post asynch read into buffers mapped by an iovec from file at given offset.
93 extern ioid_t ipreadv(int fd,
94 const struct iovec *iov,
98 #if _LARGEFILE64_SOURCE
100 * Post asynch read into buffers mapped by an iovec from file at given offset.
102 extern ioid_t ipread64v(int fd,
103 const struct iovec *iov,
109 * Post asynch read into buffer from file at given offset.
111 extern ioid_t ipread(int fd,
116 #if _LARGEFILE64_SOURCE
118 * Post asynch read into buffer from file at given offset.
120 extern ioid_t ipread64(int fd,
127 * Read into buffers mapped by an iovec from file at given offset.
129 extern ssize_t preadv(int fd,
130 const struct iovec *iov,
134 #if _LARGEFILE64_SOURCE
136 * Read into buffers mapped by an iovec from file at given offset.
138 extern ssize_t pread64v(int fd,
139 const struct iovec *iov,
145 * Post asynch read into buffers mapped by an iovec.
147 extern ioid_t ireadv(int fd,
148 const struct iovec *iov,
154 extern ioid_t iread(int fd,
159 * Post async read into buffers mapped by iovec from regions mapped
162 * NB: An adaptation of "listio" from Argonne's PVFS.
164 extern ioid_t ireadx(int fd,
165 const struct iovec *iov,
167 const struct xtvec *xtv,
170 #ifdef __USE_LARGEFILE64
172 * Post async read into buffers mapped by iovec from regions mapped
175 * NB: An adaptation of "listio" from Argonne's PVFS.
177 extern ioid_t iread64x(int fd,
178 const struct iovec *iov,
180 const struct xtvec64 *xtv,
185 * Read into buffers mapped by iovec from regions mapped
188 * NB: An adaptation of "listio" from Argonne's PVFS.
190 extern ssize_t readx(int fd,
191 const struct iovec *iov,
193 const struct xtvec *xtv,
196 #ifdef __USE_LARGEFILE64
198 * Read into buffers mapped by iovec from regions mapped
201 * NB: An adaptation of "listio" from Argonne's PVFS.
203 extern ssize_t read64x(int fd,
204 const struct iovec *iov,
206 const struct xtvec64 *xtv,
211 * Post asynch write from buffers mapped by an iovec to file at given offset.
213 extern ioid_t ipwritev(int fd,
214 const struct iovec *iov,
217 #if _LARGEFILE64_SOURCE
219 * Post asynch write from buffers mapped by an iovec to file at given offset.
221 extern ioid_t ipwrite64v(int fd,
222 const struct iovec *iov,
228 * Post asynch write from buffer to file at given offset.
230 extern ioid_t ipwrite(int fd,
235 #if _LARGEFILE64_SOURCE
237 * Post asynch write from buffer to file at given offset.
239 extern ioid_t ipwrite64(int fd,
246 * Write from buffers mapped by an iovec to file at given offset.
248 extern ssize_t pwritev(int fd,
249 const struct iovec *iov,
253 #if _LARGEFILE64_SOURCE
255 * Write from buffers mapped by an iovec to file at given offset.
257 extern ssize_t pwrite64v(int fd,
258 const struct iovec *iov,
264 * Post asynch write from buffer to file at given offset.
266 extern ioid_t iwritev(int fd,
267 const struct iovec *iov,
271 * Write from buffer to file at given offset.
273 extern ioid_t iwrite(int fd,
278 * Post async write from buffers mapped by iovec to regions mapped
281 * NB: An adaptation of "listio" from Argonne's PVFS.
283 extern ioid_t iwritex(int fd,
284 const struct iovec *iov,
286 const struct xtvec *xtv,
289 #ifdef __USE_LARGEFILE64
291 * Post async write from buffers mapped by iovec to regions mapped
294 * NB: An adaptation of "listio" from Argonne's PVFS.
296 extern ioid_t iwrite64x(int fd,
297 const struct iovec *iov,
299 const struct xtvec64 *xtv,
304 * Write from buffers mapped by iovec to regions mapped
307 * NB: An adaptation of "listio" from Argonne's PVFS.
309 extern ssize_t writex(int fd,
310 const struct iovec *iov,
312 const struct xtvec *xtv,
315 #ifdef __USE_LARGEFILE64
317 * Write from buffers mapped by iovec to regions mapped
320 * NB: An adaptation of "listio" from Argonne's PVFS.
322 extern ssize_t write64x(int fd,
323 const struct iovec *iov,
325 const struct xtvec64 *xtv,
328 #endif /* ! _XTIO_H_ */