CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_4_1_8_patch13/src/Utilities/RFIOAdaptor/interface/RFIO.h

Go to the documentation of this file.
00001 #ifndef RFIO_ADAPTOR_RFIO_H
00002 # define RFIO_ADAPTOR_RFIO_H
00003 
00004 # include <sys/stat.h>
00005 # include <sys/uio.h>
00006 # include <unistd.h>
00007 # include <fcntl.h>
00008 
00009 # define RFIO_READOPT 1
00010 # define serrno (*C__serrno())
00011 # define rfio_errno (*C__rfio_errno())
00012 
00013 extern "C"
00014 {
00015   // This is a RFIO-special structure like the "iovec" one
00016   // in sys/uio.h, but this doesn't actually exist on the system.
00017   struct iovec64
00018   {
00019     off64_t iov_base;
00020     int     iov_len;
00021   };
00022 
00023   int     rfio_preseek64(int, struct iovec64 *, int);
00024   int     rfio_open64(const char *filepath, int flags, int mode);
00025   int     rfio_close(int s);
00026   int     rfio_close64(int s) { return  rfio_close(s);}
00027   int     rfio_read64(int s, void *ptr, int size);
00028   int     rfio_write64(int s, const void *ptr, int size);
00029   off64_t rfio_lseek64(int s, off64_t  offset, int how);
00030   int     rfio_access(const char *filepath, int mode);
00031   int     rfio_unlink(const char *filepath);
00032   int     rfio_parse(const char *name, char **host, char **path);
00033   int     rfio_stat64(const char *path, struct stat *statbuf);
00034   int     rfio_fstat64(int s, struct stat *statbuf);
00035   void    rfio_perror(const char *msg);
00036   char *  rfio_serror();
00037   int     rfioreadopt(int opt);
00038   int     rfiosetopt(int opt, int *pval, int len);
00039   int     rfio_mkdir(const char *path, int mode);
00040   void *  rfio_opendir(const char *dirpath);
00041   int     rfio_closedir(void *dirp);
00042   void *  rfio_readdir(void *dirp);
00043 
00044   int     Cthread_init(void);
00045   int *   C__rfio_errno(void);
00046   int *   C__serrno(void);
00047 }
00048 
00049 #endif // RFIO_ADAPTOR_RFIO_H