1 /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */
2 /*
3  *
4  *   Copyright (C) 1997 University of Chicago.
5  *   See COPYRIGHT notice in top-level directory.
6  */
7 
8 /* contains definitions, declarations, and macros specific to the
9    implementation of ADIO on PFS */
10 
11 #ifndef AD_PFS_INCLUDE
12 #define AD_PFS_INCLUDE
13 
14 #include <unistd.h>
15 #include <sys/types.h>
16 #include <fcntl.h>
17 #include <nx.h>
18 #include <sys/uio.h>
19 #include "adio.h"
20 
21 #ifdef tflops
22 #define lseek eseek
23 #define _gopen(n,m,i,p) open(n,m,p)
24 #endif
25 
26 /* PFS file-pointer modes (removed most of them because they are unused) */
27 #ifndef M_ASYNC
28 #define M_UNIX                    0
29 #define M_ASYNC                   5
30 #endif
31 
32 void ADIOI_PFS_Open(ADIO_File fd, int *error_code);
33 void ADIOI_PFS_ReadContig(ADIO_File fd, void *buf, int count,
34                       MPI_Datatype datatype, int file_ptr_type,
35                      ADIO_Offset offset, ADIO_Status *status, int
36 		     *error_code);
37 void ADIOI_PFS_WriteContig(ADIO_File fd, void *buf, int count,
38                       MPI_Datatype datatype, int file_ptr_type,
39                       ADIO_Offset offset, ADIO_Status *status, int
40 		      *error_code);
41 void ADIOI_PFS_IwriteContig(ADIO_File fd, void *buf, int count,
42                       MPI_Datatype datatype, int file_ptr_type,
43                       ADIO_Offset offset, ADIO_Request *request, int
44 		      *error_code);
45 void ADIOI_PFS_IreadContig(ADIO_File fd, void *buf, int count,
46                       MPI_Datatype datatype, int file_ptr_type,
47                       ADIO_Offset offset, ADIO_Request *request, int
48 		      *error_code);
49 int ADIOI_PFS_ReadDone(ADIO_Request *request, ADIO_Status *status, int
50 		       *error_code);
51 int ADIOI_PFS_WriteDone(ADIO_Request *request, ADIO_Status *status, int
52 		       *error_code);
53 void ADIOI_PFS_ReadComplete(ADIO_Request *request, ADIO_Status *status, int
54 		       *error_code);
55 void ADIOI_PFS_WriteComplete(ADIO_Request *request, ADIO_Status *status,
56 			int *error_code);
57 void ADIOI_PFS_Fcntl(ADIO_File fd, int flag, ADIO_Fcntl_t *fcntl_struct, int
58 		*error_code);
59 void ADIOI_PFS_Flush(ADIO_File fd, int *error_code);
60 void ADIOI_PFS_SetInfo(ADIO_File fd, MPI_Info users_info, int *error_code);
61 
62 #endif
63