1 /* -*- Mode: C; c-basic-offset:4 ; -*- */
2 /*
3  *   Copyright (C) 1997 University of Chicago.
4  *   See COPYRIGHT notice in top-level directory.
5  */
6 
7 #ifndef AD_NFS_INCLUDE
8 #define AD_NFS_INCLUDE
9 
10 #include <unistd.h>
11 #include <sys/types.h>
12 #include <fcntl.h>
13 #include "adio.h"
14 
15 #ifdef HAVE_SIGNAL_H
16 #include <signal.h>
17 #endif
18 #ifdef HAVE_SYS_TYPES_H
19 #include <sys/types.h>
20 #endif
21 #ifdef HAVE_AIO_H
22 #include <aio.h>
23 #endif
24 #ifdef HAVE_SYS_AIO_H
25 #include <sys/aio.h>
26 #endif
27 
28 /* Workaround for incomplete set of definitions if __REDIRECT is not
29    defined and large file support is used in aio.h */
30 #if !defined(__REDIRECT) && defined(__USE_FILE_OFFSET64)
31 #define aiocb aiocb64
32 #endif
33 
34 int ADIOI_NFS_aio(ADIO_File fd, void *buf, int len, ADIO_Offset offset,
35                   int wr, MPI_Request *request);
36 
37 #ifdef SX4
38 #define lseek llseek
39 #endif
40 
41 void ADIOI_NFS_Open(ADIO_File fd, int *error_code);
42 void ADIOI_NFS_ReadContig(ADIO_File fd, void *buf, int count,
43                       MPI_Datatype datatype, int file_ptr_type,
44                      ADIO_Offset offset, ADIO_Status *status, int
45 		     *error_code);
46 void ADIOI_NFS_WriteContig(ADIO_File fd, const void *buf, int count,
47                       MPI_Datatype datatype, int file_ptr_type,
48                       ADIO_Offset offset, ADIO_Status *status, int
49 		      *error_code);
50 void ADIOI_NFS_IwriteContig(ADIO_File fd, void *buf, int count,
51                       MPI_Datatype datatype, int file_ptr_type,
52                       ADIO_Offset offset, ADIO_Request *request, int
53 		      *error_code);
54 void ADIOI_NFS_IreadContig(ADIO_File fd, void *buf, int count,
55                       MPI_Datatype datatype, int file_ptr_type,
56                       ADIO_Offset offset, ADIO_Request *request, int
57 		      *error_code);
58 int ADIOI_NFS_ReadDone(ADIO_Request *request, ADIO_Status *status, int
59 		       *error_code);
60 int ADIOI_NFS_WriteDone(ADIO_Request *request, ADIO_Status *status, int
61 		       *error_code);
62 void ADIOI_NFS_ReadComplete(ADIO_Request *request, ADIO_Status *status, int
63 		       *error_code);
64 void ADIOI_NFS_WriteComplete(ADIO_Request *request, ADIO_Status *status,
65 			int *error_code);
66 void ADIOI_NFS_Fcntl(ADIO_File fd, int flag, ADIO_Fcntl_t *fcntl_struct, int
67 		*error_code);
68 void ADIOI_NFS_WriteStrided(ADIO_File fd, const void *buf, int count,
69 		       MPI_Datatype datatype, int file_ptr_type,
70 		       ADIO_Offset offset, ADIO_Status *status, int
71 		       *error_code);
72 void ADIOI_NFS_ReadStrided(ADIO_File fd, void *buf, int count,
73 		       MPI_Datatype datatype, int file_ptr_type,
74 		       ADIO_Offset offset, ADIO_Status *status, int
75 		       *error_code);
76 void ADIOI_NFS_SetInfo(ADIO_File fd, MPI_Info users_info, int *error_code);
77 void ADIOI_NFS_Get_shared_fp(ADIO_File fd, int size, ADIO_Offset *shared_fp,
78 			 int *error_code);
79 void ADIOI_NFS_Set_shared_fp(ADIO_File fd, ADIO_Offset offset, int *error_code);
80 void ADIOI_NFS_Resize(ADIO_File fd, ADIO_Offset size, int *error_code);
81 int ADIOI_NFS_Feature(ADIO_File fd, int feature_flag);
82 
83 #endif
84