xrootd
Loading...
Searching...
No Matches
XrdOssMio.hh
Go to the documentation of this file.
1#ifndef __XRDOSSMIO_H__
2#define __XRDOSSMIO_H__
3/******************************************************************************/
4/* */
5/* X r d o s s M i o . h h */
6/* */
7/* (c) 2005 by the Board of Trustees of the Leland Stanford, Jr., University */
8/* All Rights Reserved */
9/* Produced by Andrew Hanushevsky for Stanford University under contract */
10/* DE-AC02-76-SFO0515 with the Department of Energy */
11/* */
12/* This file is part of the XRootD software suite. */
13/* */
14/* XRootD is free software: you can redistribute it and/or modify it under */
15/* the terms of the GNU Lesser General Public License as published by the */
16/* Free Software Foundation, either version 3 of the License, or (at your */
17/* option) any later version. */
18/* */
19/* XRootD is distributed in the hope that it will be useful, but WITHOUT */
20/* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or */
21/* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public */
22/* License for more details. */
23/* */
24/* You should have received a copy of the GNU Lesser General Public License */
25/* along with XRootD in a file called COPYING.LESSER (LGPL license) and file */
26/* COPYING (GPL license). If not, see <http://www.gnu.org/licenses/>. */
27/* */
28/* The copyright holder's institutional names and contributor's names may not */
29/* be used to endorse or promote products derived from this software without */
30/* specific prior written permission of the institution or contributor. */
31/******************************************************************************/
32
33#include "XrdSys/XrdSysError.hh"
34#include "XrdOuc/XrdOucHash.hh"
37
38// The following are options passed to Map()
39//
40#define OSSMIO_MLOK 0x0001
41#define OSSMIO_MMAP 0x0002
42#define OSSMIO_MPRM 0x0004
43
45{
46public:
47static void Display(XrdSysError &Eroute);
48
49static char isAuto() {return MM_chk;}
50
51static char isOn() {return MM_on;}
52
53static XrdOssMioFile *Map(char *path, int fd, int opts);
54
55static void *preLoad(void *arg);
56
57static void Recycle(XrdOssMioFile *mp);
58
59static void Set(int V_off, int V_preld, int V_check);
60
61static void Set(long long V_max);
62
63private:
64static int Reclaim(off_t amount);
65static int Reclaim(XrdOssMioFile *mp);
66
68
73
74static char MM_on;
75static char MM_chk;
76static char MM_okmlock;
77static char MM_preld;
78static long long MM_max;
79static long long MM_pagsz;
80static long long MM_pages;
81static long long MM_inuse;
82};
83#endif
Definition XrdOssMioFile.hh:37
Definition XrdOssMio.hh:45
static void * preLoad(void *arg)
static long long MM_max
Definition XrdOssMio.hh:78
static XrdOssMioFile * MM_Idle
Definition XrdOssMio.hh:71
static char MM_preld
Definition XrdOssMio.hh:77
static void Recycle(XrdOssMioFile *mp)
static char MM_on
Definition XrdOssMio.hh:74
static XrdOucHash< XrdOssMioFile > MM_Hash
Definition XrdOssMio.hh:67
static long long MM_pagsz
Definition XrdOssMio.hh:79
static long long MM_inuse
Definition XrdOssMio.hh:81
static char isOn()
Definition XrdOssMio.hh:51
static char isAuto()
Definition XrdOssMio.hh:49
static int Reclaim(off_t amount)
static void Display(XrdSysError &Eroute)
static char MM_okmlock
Definition XrdOssMio.hh:76
static void Set(long long V_max)
static XrdOssMioFile * MM_Perm
Definition XrdOssMio.hh:70
static XrdSysMutex MM_Mutex
Definition XrdOssMio.hh:69
static char MM_chk
Definition XrdOssMio.hh:75
static int Reclaim(XrdOssMioFile *mp)
static XrdOssMioFile * Map(char *path, int fd, int opts)
static long long MM_pages
Definition XrdOssMio.hh:80
static XrdOssMioFile * MM_IdleLast
Definition XrdOssMio.hh:72
static void Set(int V_off, int V_preld, int V_check)
Definition XrdOucHash.hh:128
Definition XrdSysError.hh:90
Definition XrdSysPthread.hh:165