XrdPoll Class Reference

#include <XrdPoll.hh>

Inheritance diagram for XrdPoll:

XrdPollDev XrdPollE XrdPollPoll List of all members.

Public Member Functions

virtual void Disable (XrdLink *lp, const char *etxt=0)=0
virtual int Enable (XrdLink *lp)=0
virtual void Start (XrdSysSemaphore *syncp, int &rc)=0
 XrdPoll ()
virtual ~XrdPoll ()

Static Public Member Functions

static int Attach (XrdLink *lp)
static void Detach (XrdLink *lp)
static int Finish (XrdLink *lp, const char *etxt=0)
static char * Poll2Text (short events)
static int Setup (int numfd)
static int Stats (char *buff, int blen, int do_sync=0)

Public Attributes

int PID
pthread_t TID

Static Public Attributes

static XrdPollPollers [XRD_NUMPOLLERS]

Protected Member Functions

int getRequest ()
virtual void Exclude (XrdLink *lp)=0
virtual int Include (XrdLink *lp)=0

Static Protected Member Functions

static XrdPollnewPoller (int pollid, int numfd)

Protected Attributes

XrdSysMutex PollPipe
pollfd PipePoll
int CmdFD
int ReqFD
PipeData ReqBuff
char * PipeBuff
int PipeBlen
int numEnabled
int numEvents
int numInterrupts

Static Protected Attributes

static const char * TraceID

Private Attributes

int numAttached

Static Private Attributes

static XrdSysMutex doingAttach

Classes

struct  PipeData

Detailed Description

Definition at line 22 of file XrdPoll.hh.


Constructor & Destructor Documentation

XrdPoll::XrdPoll (  ) 

Definition at line 97 of file XrdPoll.cc.

References CmdFD, XrdSysError::Emsg(), pollfd::events, F_SETFD, fcntl(), pollfd::fd, FD_CLOEXEC, numAttached, numEnabled, numEvents, numInterrupts, pipe, PipeBlen, PipeBuff, PipePoll, POLLIN, POLLRDNORM, ReqFD, and TID.

virtual XrdPoll::~XrdPoll (  )  [inline, virtual]

Definition at line 72 of file XrdPoll.hh.


Member Function Documentation

int XrdPoll::Attach ( XrdLink lp  )  [static]

Definition at line 121 of file XrdPoll.cc.

References doingAttach, XrdLink::FD, i, if(), Include(), XrdSysMutex::Lock(), numAttached, PID, XrdLink::Poller, Pollers, TRACEI, XrdSysMutex::UnLock(), and XRD_NUMPOLLERS.

Referenced by XrdProofdProofServMgr::Accept(), and XrdProtLoad::Process().

void XrdPoll::Detach ( XrdLink lp  )  [static]

Definition at line 153 of file XrdPoll.cc.

References doingAttach, XrdSysError::Emsg(), Exclude(), XrdLink::FD, XrdLink::ID, XrdSysMutex::Lock(), numAttached, PID, XrdLink::Poller, TRACEI, and XrdSysMutex::UnLock().

Referenced by XrdLink::Close().

virtual void XrdPoll::Disable ( XrdLink lp,
const char *  etxt = 0 
) [pure virtual]

Referenced by XrdLinkScan::idleScan(), and XrdLink::Terminate().

virtual int XrdPoll::Enable ( XrdLink lp  )  [pure virtual]

Referenced by XrdLink::DoIt().

int XrdPoll::Finish ( XrdLink lp,
const char *  etxt = 0 
) [static]

Definition at line 179 of file XrdPoll.cc.

References XrdLink::Etext, XrdLink::FD, free(), XrdLink::ProtoAlt, XrdLink::Protocol, and TRACEI.

char * XrdPoll::Poll2Text ( short  events  )  [static]

Definition at line 250 of file XrdPoll.cc.

References POLLERR, POLLHUP, POLLNVAL, and sprintf().

Referenced by XrdLink::Peek(), XrdLink::Recv(), and XrdLink::RecvAll().

int XrdPoll::Setup ( int  numfd  )  [static]

Definition at line 269 of file XrdPoll.cc.

References XrdSysError::Emsg(), i, newPoller(), PID, XrdPollArg::Poller, Pollers, XrdPollArg::retcode, XrdSysThread::Run(), TID, TRACE, XRD_NUMPOLLERS, XrdStartPolling(), and XRDSYSTHREAD_BIND.

Referenced by XrdConfig::Setup().

virtual void XrdPoll::Start ( XrdSysSemaphore syncp,
int &  rc 
) [pure virtual]

Referenced by XrdStartPolling().

int XrdPoll::Stats ( char *  buff,
int  blen,
int  do_sync = 0 
) [static]

Definition at line 310 of file XrdPoll.cc.

References i, numAttached, numEnabled, numEvents, numInterrupts, Pollers, snprintf, and XRD_NUMPOLLERS.

Referenced by XrdStats::Stats().

int XrdPoll::getRequest (  )  [protected]

Definition at line 210 of file XrdPoll.cc.

References XrdSysError::Emsg(), PID, PipeBlen, PipeBuff, PipePoll, poll(), read, ReqBuff, ReqFD, ssize_t, and TRACE.

virtual void XrdPoll::Exclude ( XrdLink lp  )  [protected, pure virtual]

Referenced by Detach().

virtual int XrdPoll::Include ( XrdLink lp  )  [protected, pure virtual]

Referenced by Attach().

static XrdPoll* XrdPoll::newPoller ( int  pollid,
int  numfd 
) [static, protected]

Referenced by Setup().


Member Data Documentation

int XrdPoll::PID

Definition at line 64 of file XrdPoll.hh.

Referenced by Attach(), Detach(), getRequest(), and Setup().

pthread_t XrdPoll::TID

Definition at line 65 of file XrdPoll.hh.

Referenced by Setup(), and XrdPoll().

XrdPoll * XrdPoll::Pollers [static]

Definition at line 69 of file XrdPoll.hh.

Referenced by Attach(), Setup(), and Stats().

const char * XrdPoll::TraceID [static, protected]

Definition at line 76 of file XrdPoll.hh.

XrdSysMutex XrdPoll::PollPipe [protected]

Definition at line 97 of file XrdPoll.hh.

struct pollfd XrdPoll::PipePoll [protected]

Definition at line 98 of file XrdPoll.hh.

Referenced by getRequest(), and XrdPoll().

int XrdPoll::CmdFD [protected]

Definition at line 99 of file XrdPoll.hh.

Referenced by XrdPoll().

int XrdPoll::ReqFD [protected]

Definition at line 100 of file XrdPoll.hh.

Referenced by getRequest(), and XrdPoll().

PipeData XrdPoll::ReqBuff [protected]

Definition at line 108 of file XrdPoll.hh.

Referenced by getRequest().

char* XrdPoll::PipeBuff [protected]

Definition at line 109 of file XrdPoll.hh.

Referenced by getRequest(), and XrdPoll().

int XrdPoll::PipeBlen [protected]

Definition at line 110 of file XrdPoll.hh.

Referenced by getRequest(), and XrdPoll().

int XrdPoll::numEnabled [protected]

Definition at line 114 of file XrdPoll.hh.

Referenced by Stats(), and XrdPoll().

int XrdPoll::numEvents [protected]

Definition at line 115 of file XrdPoll.hh.

Referenced by Stats(), and XrdPoll().

int XrdPoll::numInterrupts [protected]

Definition at line 116 of file XrdPoll.hh.

Referenced by Stats(), and XrdPoll().

XrdSysMutex XrdPoll::doingAttach [static, private]

Definition at line 120 of file XrdPoll.hh.

Referenced by Attach(), and Detach().

int XrdPoll::numAttached [private]

Definition at line 121 of file XrdPoll.hh.

Referenced by Attach(), Detach(), Stats(), and XrdPoll().


The documentation for this class was generated from the following files:
Generated on Tue Jul 5 16:50:40 2011 for ROOT_528-00b_version by  doxygen 1.5.1