xrootd
Main Page
Namespaces
Classes
Files
File List
File Members
src
XrdXrootd
XrdXrootdPio.hh
Go to the documentation of this file.
1
#ifndef __XRDXROOTDPIO__
2
#define __XRDXROOTDPIO__
3
/******************************************************************************/
4
/* */
5
/* X r d X r o o t d P i o . h h */
6
/* */
7
/* (c) 2007 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
13
#include "
XProtocol/XPtypes.hh
"
14
#include "
XrdSys/XrdSysPthread.hh
"
15
16
class
XrdXrootdFile
;
17
18
class
XrdXrootdPio
19
{
20
public
:
21
22
XrdXrootdPio
*
Next
;
23
XrdXrootdFile
*
myFile
;
24
long
long
myOffset
;
25
int
myIOLen
;
26
kXR_char
StreamID
[2];
27
char
isWrite
;
28
29
static
XrdXrootdPio
*
Alloc
(
int
n=1);
30
31
inline
XrdXrootdPio
*
Clear
(
XrdXrootdPio
*np=0)
32
{
const
kXR_char
zed[2] = {0,0};
33
Set
(0, 0, 0, zed,
'\0'
);
34
Next
= np;
return
this
;
35
}
36
37
void
Recycle
();
38
39
inline
void
Set
(
XrdXrootdFile
*theFile,
long
long
theOffset,
40
int
theIOLen,
const
kXR_char
*theSID,
char
theW)
41
{
myFile
= theFile;
42
myOffset
= theOffset;
43
myIOLen
= theIOLen;
44
StreamID
[0] = theSID[0];
StreamID
[1] = theSID[1];
45
isWrite
= theW;
46
}
47
48
XrdXrootdPio
(
XrdXrootdPio
*np=0) {
Clear
(np);}
49
~XrdXrootdPio
() {}
50
51
private
:
52
53
static
const
int
FreeMax
= 256;
54
static
XrdSysMutex
myMutex
;
55
static
XrdXrootdPio
*
Free
;
56
static
int
FreeNum
;
57
};
58
#endif
Generated by
1.8.1.2