Loading...
Searching...
No Matches
XrdXrootdPio Class Reference

`#include <XrdXrootdPio.hh>`

Collaboration diagram for XrdXrootdPio:

## Public Member Functions

| XrdXrootdPio (XrdXrootdPio *np=0)
| ~XrdXrootdPio ()
XrdXrootdPio * | Clear (XrdXrootdPio *np=0)
void | Recycle ()
void | Set (int(XrdXrootdProtocol::*Invoke)(), XrdXrootd::IOParms &io, const kXR_char *theSID)

## Static Public Member Functions

static XrdXrootdPio * | Alloc (int n=1)

## Public Attributes

XrdXrootd::IOParms | IO
XrdXrootdPio * | Next
int(XrdXrootdProtocol::* | ResumePio )()
kXR_char | StreamID [2]

## Detailed Description

Definition at line 39 of file XrdXrootdPio.hh.

## Constructor & Destructor Documentation

## XrdXrootdPio()

XrdXrootdPio::XrdXrootdPio | ( | XrdXrootdPio * | np = 0 | ) |

inline

Definition at line 66 of file XrdXrootdPio.hh.

{Clear(np);}
XrdXrootdPio::Clear
XrdXrootdPio * Clear(XrdXrootdPio *np=0)
Definition XrdXrootdPio.hh:50

References XrdXrootdPio(), and Clear().

Referenced by XrdXrootdPio(), Alloc(), and Clear().

Here is the call graph for this function:
Here is the caller graph for this function:

## ~XrdXrootdPio()

XrdXrootdPio::~XrdXrootdPio | ( |  | ) |

inline

Definition at line 67 of file XrdXrootdPio.hh.

{}

## Member Function Documentation

## Alloc()

XrdXrootdPio * XrdXrootdPio::Alloc | ( | int | n = 1 | ) |

static

Definition at line 45 of file XrdXrootdPio.cc.

{
XrdXrootdPio *lqp, *qp=0;
// Allocate from the free stack
//
myMutex.Lock();
if ((qp = Free))
{do {FreeNum--; Num--; lqp = Free;}
while((Free = Free->Next) && Num);
lqp->Next = 0;
}
myMutex.UnLock();
// Allocate additional if we have not allocated enough
//
while(Num--) qp = new XrdXrootdPio(qp);
// All done
//
return qp;
}
XrdXrootdPio::Next
XrdXrootdPio * Next
Definition XrdXrootdPio.hh:43
XrdXrootdPio::XrdXrootdPio
XrdXrootdPio(XrdXrootdPio *np=0)
Definition XrdXrootdPio.hh:66

References XrdXrootdPio(), and Next.

Here is the call graph for this function:

## Clear()

XrdXrootdPio * XrdXrootdPio::Clear | ( | XrdXrootdPio * | np = 0 | ) |

inline

Definition at line 50 of file XrdXrootdPio.hh.

{ResumePio = 0;
memset(&IO, 0, sizeof(IO));
StreamID[0] = 0; StreamID[1] = 0;
Next = np; return this;
}
XrdXrootdPio::IO
XrdXrootd::IOParms IO
Definition XrdXrootdPio.hh:45
XrdXrootdPio::ResumePio
int(XrdXrootdProtocol::* ResumePio)()
Definition XrdXrootdPio.hh:44
XrdXrootdPio::StreamID
kXR_char StreamID[2]
Definition XrdXrootdPio.hh:46

References XrdXrootdPio(), IO, Next, ResumePio, and StreamID.

Referenced by XrdXrootdPio(), and Recycle().

Here is the call graph for this function:
Here is the caller graph for this function:

## Recycle()

void XrdXrootdPio::Recycle | ( |  | ) |

Definition at line 73 of file XrdXrootdPio.cc.

{
// Check if we can hold on to this or must delete it
//
myMutex.Lock();
if (FreeNum >= FreeMax) {myMutex.UnLock(); delete this; return;}
// Clean this up and push the element on the free stack
//
Free = Clear(Free); FreeNum++;
myMutex.UnLock();
}

References Clear().

Here is the call graph for this function:

## Set()

void XrdXrootdPio::Set | ( | int(XrdXrootdProtocol::* | Invoke )(),
|  | XrdXrootd::IOParms & | io,
|  | const kXR_char * | theSID )

inline

Definition at line 59 of file XrdXrootdPio.hh.

{ResumePio = Invoke;
IO = io;
StreamID[0] = theSID[0]; StreamID[1] = theSID[1];
}

References IO, ResumePio, and StreamID.

## Member Data Documentation

## IO

XrdXrootd::IOParms XrdXrootdPio::IO

Definition at line 45 of file XrdXrootdPio.hh.

Referenced by Clear(), and Set().

## Next

XrdXrootdPio* XrdXrootdPio::Next

Definition at line 43 of file XrdXrootdPio.hh.

Referenced by Alloc(), and Clear().

## ResumePio

int(XrdXrootdProtocol::* XrdXrootdPio::ResumePio) ()

Definition at line 44 of file XrdXrootdPio.hh.

Referenced by Clear(), and Set().

## StreamID

kXR_char XrdXrootdPio::StreamID[2]

Definition at line 46 of file XrdXrootdPio.hh.

Referenced by Clear(), and Set().

The documentation for this class was generated from the following files:

- XrdXrootdPio.hh
- XrdXrootdPio.cc