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.
53 * When compiled for use with libsysio, this allows one to move all the
54 * externals to a distinct namespace. When not, we want it to do nothing.
56 * NB: The choice of macro name here is dangerous. It's in the global
57 * namespace! We should fix that one of these days.
59 #if !defined(SYSIO_INTERFACE_NAME)
60 #define SYSIO_INTERFACE_NAME(_n) _n
63 #ifndef _IOID_T_DEFINED
64 #define _IOID_T_DEFINED
71 * Structure for strided I/O.
74 #ifndef __USE_FILE_OFFSET64
75 __off_t xtv_off; /* Stride/Extent offset. */
77 __off64_t xtv_off; /* Stride/Extent offset. */
79 size_t xtv_len; /* Stride/Extent length. */
82 #ifdef __USE_LARGEFILE64
84 __off64_t xtv_off; /* Stride/Extent offset. */
85 size_t xtv_len; /* Stride/Extent length. */
92 * Get status of previously posted async file IO operation.
94 extern int SYSIO_INTERFACE_NAME(iodone)(ioid_t ioid);
97 * Wait for completion of a previously posted asynch file IO request.
99 extern ssize_t SYSIO_INTERFACE_NAME(iowait)(ioid_t ioid);
102 * Post asynch read into buffers mapped by an iovec from file at given offset.
104 extern ioid_t SYSIO_INTERFACE_NAME(ipreadv)(int fd,
105 const struct iovec *iov,
109 #ifdef _LARGEFILE64_SOURCE
111 * Post asynch read into buffers mapped by an iovec from file at given offset.
113 extern ioid_t SYSIO_INTERFACE_NAME(ipread64v)(int fd,
114 const struct iovec *iov,
120 * Post asynch read into buffer from file at given offset.
122 extern ioid_t SYSIO_INTERFACE_NAME(ipread)(int fd,
127 #ifdef _LARGEFILE64_SOURCE
129 * Post asynch read into buffer from file at given offset.
131 extern ioid_t SYSIO_INTERFACE_NAME(ipread64)(int fd,
138 * Read into buffers mapped by an iovec from file at given offset.
140 extern ssize_t SYSIO_INTERFACE_NAME(preadv)(int fd,
141 const struct iovec *iov,
145 #ifdef _LARGEFILE64_SOURCE
147 * Read into buffers mapped by an iovec from file at given offset.
149 extern ssize_t SYSIO_INTERFACE_NAME(pread64v)(int fd,
150 const struct iovec *iov,
156 * Post asynch read into buffers mapped by an iovec.
158 extern ioid_t SYSIO_INTERFACE_NAME(ireadv)(int fd,
159 const struct iovec *iov,
165 extern ioid_t SYSIO_INTERFACE_NAME(iread)(int fd,
170 * Post async read into buffers mapped by iovec from regions mapped
173 * NB: An adaptation of "listio" from Argonne's PVFS.
175 extern ioid_t SYSIO_INTERFACE_NAME(ireadx)(int fd,
176 const struct iovec *iov,
178 const struct xtvec *xtv,
181 #ifdef __USE_LARGEFILE64
183 * Post async read into buffers mapped by iovec from regions mapped
186 * NB: An adaptation of "listio" from Argonne's PVFS.
188 extern ioid_t SYSIO_INTERFACE_NAME(iread64x)(int fd,
189 const struct iovec *iov,
191 const struct xtvec64 *xtv,
196 * Read into buffers mapped by iovec from regions mapped
199 * NB: An adaptation of "listio" from Argonne's PVFS.
201 extern ssize_t SYSIO_INTERFACE_NAME(readx)(int fd,
202 const struct iovec *iov,
204 const struct xtvec *xtv,
207 #ifdef __USE_LARGEFILE64
209 * Read into buffers mapped by iovec from regions mapped
212 * NB: An adaptation of "listio" from Argonne's PVFS.
214 extern ssize_t SYSIO_INTERFACE_NAME(read64x)(int fd,
215 const struct iovec *iov,
217 const struct xtvec64 *xtv,
222 * Post asynch write from buffers mapped by an iovec to file at given offset.
224 extern ioid_t SYSIO_INTERFACE_NAME(ipwritev)(int fd,
225 const struct iovec *iov,
228 #ifdef _LARGEFILE64_SOURCE
230 * Post asynch write from buffers mapped by an iovec to file at given offset.
232 extern ioid_t SYSIO_INTERFACE_NAME(ipwrite64v)(int fd,
233 const struct iovec *iov,
239 * Post asynch write from buffer to file at given offset.
241 extern ioid_t SYSIO_INTERFACE_NAME(ipwrite)(int fd,
246 #ifdef _LARGEFILE64_SOURCE
248 * Post asynch write from buffer to file at given offset.
250 extern ioid_t SYSIO_INTERFACE_NAME(ipwrite64)(int fd,
257 * Write from buffers mapped by an iovec to file at given offset.
259 extern ssize_t SYSIO_INTERFACE_NAME(pwritev)(int fd,
260 const struct iovec *iov,
264 #ifdef _LARGEFILE64_SOURCE
266 * Write from buffers mapped by an iovec to file at given offset.
268 extern ssize_t SYSIO_INTERFACE_NAME(pwrite64v)(int fd,
269 const struct iovec *iov,
275 * Post asynch write from buffer to file at given offset.
277 extern ioid_t SYSIO_INTERFACE_NAME(iwritev)(int fd,
278 const struct iovec *iov,
282 * Write from buffer to file at given offset.
284 extern ioid_t SYSIO_INTERFACE_NAME(iwrite)(int fd,
289 * Post async write from buffers mapped by iovec to regions mapped
292 * NB: An adaptation of "listio" from Argonne's PVFS.
294 extern ioid_t SYSIO_INTERFACE_NAME(iwritex)(int fd,
295 const struct iovec *iov,
297 const struct xtvec *xtv,
300 #ifdef __USE_LARGEFILE64
302 * Post async write from buffers mapped by iovec to regions mapped
305 * NB: An adaptation of "listio" from Argonne's PVFS.
307 extern ioid_t SYSIO_INTERFACE_NAME(iwrite64x)(int fd,
308 const struct iovec *iov,
310 const struct xtvec64 *xtv,
315 * Write from buffers mapped by iovec to regions mapped
318 * NB: An adaptation of "listio" from Argonne's PVFS.
320 extern ssize_t SYSIO_INTERFACE_NAME(writex)(int fd,
321 const struct iovec *iov,
323 const struct xtvec *xtv,
326 #ifdef __USE_LARGEFILE64
328 * Write from buffers mapped by iovec to regions mapped
331 * NB: An adaptation of "listio" from Argonne's PVFS.
333 extern ssize_t SYSIO_INTERFACE_NAME(write64x)(int fd,
334 const struct iovec *iov,
336 const struct xtvec64 *xtv,
339 #endif /* ! _XTIO_H_ */