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
"
35
#include "
XrdSys/XrdSysPthread.hh
"
36
#include "
XrdOss/XrdOssMioFile.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
44
class
XrdOssMio
45
{
46
public
:
47
static
void
Display
(
XrdSysError
&Eroute);
48
49
static
char
isAuto
() {
return
MM_chk;}
50
51
static
char
isOn
() {
return
MM_on;}
52
53
static
XrdOssMioFile
*
Map
(
char
*path,
int
fd,
int
opts
);
54
55
static
void
*
preLoad
(
void
*arg);
56
57
static
void
Recycle
(
XrdOssMioFile
*mp);
58
59
static
void
Set(
int
V_off,
int
V_preld,
int
V_check);
60
61
static
void
Set(
long
long
V_max);
62
63
private
:
64
static
int
Reclaim(off_t amount);
65
static
int
Reclaim(
XrdOssMioFile
*mp);
66
67
static
XrdOucHash<XrdOssMioFile>
MM_Hash;
68
69
static
XrdSysMutex
MM_Mutex;
70
static
XrdOssMioFile
*MM_Perm;
71
static
XrdOssMioFile
*MM_Idle;
72
static
XrdOssMioFile
*MM_IdleLast;
73
74
static
char
MM_on;
75
static
char
MM_chk;
76
static
char
MM_okmlock;
77
static
char
MM_preld;
78
static
long
long
MM_max;
79
static
long
long
MM_pagsz;
80
static
long
long
MM_pages;
81
static
long
long
MM_inuse;
82
};
83
#endif
Display
void Display()
Definition
XrdCks.cc:56
XrdOssMioFile.hh
XrdOucHash.hh
opts
struct myOpts opts
XrdSysError.hh
XrdSysPthread.hh
XrdOssMioFile
Definition
XrdOssMioFile.hh:37
XrdOssMio
Definition
XrdOssMio.hh:45
XrdOssMio::isOn
static char isOn()
Definition
XrdOssMio.hh:51
XrdOssMio::Map
static XrdOssMioFile * Map(char *path, int fd, int opts)
Definition
XrdOssMio.cc:94
XrdOssMio::isAuto
static char isAuto()
Definition
XrdOssMio.hh:49
XrdOssMio::Recycle
static void Recycle(XrdOssMioFile *mp)
Definition
XrdOssMio.cc:294
XrdOssMio::preLoad
static void * preLoad(void *arg)
Definition
XrdOssMio.cc:223
XrdOucHash
Definition
XrdOucHash.hh:128
XrdSysError
Definition
XrdSysError.hh:90
XrdSysMutex
Definition
XrdSysPthread.hh:165
XrdOss
XrdOssMio.hh
Generated by
1.9.8