00001
00002
00003
00004
00005
00006
00007
00008
00009 #ifndef AD_PANFS_INCLUDE
00010 #define AD_PANFS_INCLUDE
00011
00012 #include <unistd.h>
00013 #include <sys/types.h>
00014 #include <fcntl.h>
00015 #include "adio.h"
00016
00017 #ifndef NO_AIO
00018 #ifdef AIO_SUN
00019 #include <sys/asynch.h>
00020 #else
00021 #include <aio.h>
00022 #ifdef NEEDS_ADIOCB_T
00023 typedef struct adiocb adiocb_t;
00024 #endif
00025 #endif
00026 #endif
00027
00028 void ADIOI_PANFS_Open(ADIO_File fd, int *error_code);
00029 void ADIOI_PANFS_SetInfo(ADIO_File fd, MPI_Info users_info, int *error_code);
00030 void ADIOI_PANFS_ReadContig(ADIO_File fd, void *buf, int count,
00031 MPI_Datatype datatype, int file_ptr_type,
00032 ADIO_Offset offset, ADIO_Status *status,
00033 int *error_code);
00034 void ADIOI_PANFS_Resize(ADIO_File fd, ADIO_Offset size, int *error_code);
00035 void ADIOI_PANFS_WriteContig(ADIO_File fd, void *buf, int count,
00036 MPI_Datatype datatype, int file_ptr_type,
00037 ADIO_Offset offset, ADIO_Status *status,
00038 int *error_code);
00039
00040
00041 #define AD_PANFS_RETRY_DELAY 1000
00042
00043 #define AD_PANFS_RETRY(_op_,_rc_) \
00044 { \
00045 _rc_ = (_op_); \
00046 while(_rc_ == -1 && errno == EAGAIN) \
00047 { \
00048 if(usleep(AD_PANFS_RETRY_DELAY) == -1) \
00049 { \
00050 break; \
00051 } \
00052 _rc_ = (_op_); \
00053 } \
00054 }
00055
00056 #endif