root/ompi/mca/io/romio321/romio/adio/ad_panfs/ad_panfs.h

/* [<][>][^][v][top][bottom][index][help] */

INCLUDED FROM


   1 /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */
   2 /* 
   3  *   ad_panfs.h
   4  *
   5  *   Copyright (C) 2001 University of Chicago.
   6  *   See COPYRIGHT notice in top-level directory.
   7  */
   8 
   9 #ifndef AD_PANFS_INCLUDE
  10 #define AD_PANFS_INCLUDE
  11 
  12 #include <unistd.h>
  13 #include <sys/types.h>
  14 #include <fcntl.h>
  15 #include "adio.h"
  16 
  17 #ifndef NO_AIO
  18 # ifdef AIO_SUN
  19 # include <sys/asynch.h>
  20 # else
  21   #ifdef HAVE_AIO_LITE_H
  22   #include <aio-lite.h>
  23   #else
  24    #ifdef  HAVE_AIO_H
  25    #include <aio.h>
  26    #endif
  27    #ifdef HAVE_SYS_AIO_H
  28    #include <sys/aio.h>
  29    #endif
  30   #endif
  31 # endif
  32 #endif
  33 
  34 void ADIOI_PANFS_Open(ADIO_File fd, int *error_code);
  35 /* Panasas 6 introduced some new features */
  36 void ADIOI_PANFS_Open6(ADIO_File fd, int *error_code);
  37 void ADIOI_PANFS_SetInfo(ADIO_File fd, MPI_Info users_info, int *error_code);
  38 void ADIOI_PANFS_ReadContig(ADIO_File fd, void *buf, int count, 
  39                           MPI_Datatype datatype, int file_ptr_type,
  40                           ADIO_Offset offset, ADIO_Status *status,
  41                           int *error_code);
  42 void ADIOI_PANFS_Resize(ADIO_File fd, ADIO_Offset size, int *error_code);
  43 void ADIOI_PANFS_WriteContig(ADIO_File fd, const void *buf, int count,
  44                            MPI_Datatype datatype, int file_ptr_type,
  45                            ADIO_Offset offset, ADIO_Status *status,
  46                            int *error_code);
  47 
  48 /* TODO: move this to common code and have all routines retry. */
  49 /* TODO: also check for EWOULDBLOCK */
  50 #if defined(NEEDS_USLEEP_DECL)
  51 int usleep(useconds_t usec);
  52 #endif
  53 
  54 /* Delay 1 ms */
  55 #define AD_PANFS_RETRY_DELAY 1000
  56 
  57 #define AD_PANFS_RETRY(_op_,_rc_) \
  58 { \
  59     _rc_ = (_op_); \
  60     while(_rc_ == -1 && errno == EAGAIN) \
  61     { \
  62         if(usleep(AD_PANFS_RETRY_DELAY) == -1) \
  63         { \
  64             break; \
  65         } \
  66         _rc_ = (_op_); \
  67     } \
  68 }
  69 
  70 #endif

/* [<][>][^][v][top][bottom][index][help] */