Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members | File Members

XrdOssMio.hh

Go to the documentation of this file.
00001 #ifndef __XRDOSSMIO_H__
00002 #define __XRDOSSMIO_H__
00003 /******************************************************************************/
00004 /*                                                                            */
00005 /*                          X r d o s s M i o . h h                           */
00006 /*                                                                            */
00007 /* (c) 2005 by the Board of Trustees of the Leland Stanford, Jr., University  */
00008 /*                            All Rights Reserved                             */
00009 /*   Produced by Andrew Hanushevsky for Stanford University under contract    */
00010 /*              DE-AC02-76-SFO0515 with the Department of Energy              */
00011 /******************************************************************************/
00012 
00013 #include "XrdSys/XrdSysError.hh"
00014 #include "XrdOuc/XrdOucHash.hh"
00015 #include "XrdSys/XrdSysPthread.hh"
00016 #include "XrdOss/XrdOssMioFile.hh"
00017 
00018 // The following are options passed to Map()
00019 //
00020 #define OSSMIO_MLOK 0x0001
00021 #define OSSMIO_MMAP 0x0002
00022 #define OSSMIO_MPRM 0x0004
00023   
00024 class XrdOssMio
00025 {
00026 public:
00027 static void           Display(XrdSysError &Eroute);
00028 
00029 static char           isAuto() {return MM_chk;}
00030 
00031 static char           isOn()   {return MM_on;}
00032 
00033 static XrdOssMioFile *Map(char *path, int fd, int opts);
00034 
00035 static void          *preLoad(void *arg);
00036 
00037 static void           Recycle(XrdOssMioFile *mp);
00038 
00039 static void           Set(int V_off, int V_preld, int V_check);
00040 
00041 static void           Set(long long V_max);
00042 
00043 private:
00044 static int  Reclaim(off_t amount);
00045 static int  Reclaim(XrdOssMioFile *mp);
00046 
00047 static XrdOucHash<XrdOssMioFile> MM_Hash;
00048 
00049 static XrdSysMutex    MM_Mutex;
00050 static XrdOssMioFile *MM_Perm;
00051 static XrdOssMioFile *MM_Idle;
00052 static XrdOssMioFile *MM_IdleLast;
00053 
00054 static char       MM_on;
00055 static char       MM_chk;
00056 static char       MM_okmlock;
00057 static char       MM_preld;
00058 static long long  MM_max;
00059 static long long  MM_pagsz;
00060 static long long  MM_pages;
00061 static long long  MM_inuse;
00062 };
00063 #endif

Generated on Sun Nov 6 13:35:16 2011 for xrootd by  doxygen 1.3.9.1