xrootd
Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes
XrdSys::IOEvents::PollE Class Reference
Inheritance diagram for XrdSys::IOEvents::PollE:
Inheritance graph
[legend]
Collaboration diagram for XrdSys::IOEvents::PollE:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 PollE (struct epoll_event *ptab, int numfd, int pfd, int pFD[2])
 ~PollE ()

Static Public Member Functions

static int AllocMem (void **memP, int slots)

Protected Member Functions

void Begin (XrdSysSemaphore *syncp, int &rc, const char **eMsg)
void Exclude (Channel *cP, bool &isLocked, bool dover=1)
bool Include (Channel *cP, int &eNum, const char **eTxt, bool &isLocked)
bool Modify (Channel *cP, int &eNum, const char **eTxt, bool &isLocked)
void Shutdown ()

Private Member Functions

int AllocPT (int slots)
void Dispatch (Channel *cP, uint32_t pollEv)
bool Process ()

Private Attributes

struct epoll_event * pollTab
int pollDfd
int pollMax
int pollNum

Constructor & Destructor Documentation

XrdSys::IOEvents::PollE::PollE ( struct epoll_event *  ptab,
int  numfd,
int  pfd,
int  pFD[2] 
) [inline]

Member Function Documentation

int XrdSys::IOEvents::PollE::AllocMem ( void **  memP,
int  slots 
) [static]
int XrdSys::IOEvents::PollE::AllocPT ( int  slots) [private]
void XrdSys::IOEvents::PollE::Begin ( XrdSysSemaphore *  syncp,
int &  rc,
const char **  eTxt 
) [protected, virtual]

Start the polling event loop. An implementation must be supplied. Begin() is called via the internal BootStrap class from a new thread.

Implements XrdSys::IOEvents::Poller.

References XrdSysSemaphore::Post().

void XrdSys::IOEvents::PollE::Dispatch ( Channel *  cP,
uint32_t  pollEv 
) [private]
void XrdSys::IOEvents::PollE::Exclude ( Channel *  cP,
bool &  isLocked,
bool  dover = 1 
) [protected, virtual]

Remove a channel to the poll set. An implementation must be supplied. The channel is locked when this method is called but must be unlocked by the method if a command is sent to the poller thread and isLocked set to false.

Implements XrdSys::IOEvents::Poller.

References XrdSys::IOEvents::Channel::GetFD(), and XrdSys::IOEvents::Poller::PipeData::req.

bool XrdSys::IOEvents::PollE::Include ( Channel *  cP,
int &  eNum,
const char **  eTxt,
bool &  isLocked 
) [protected, virtual]

Add a channel to the poll set. An implementation must be supplied. The channel is locked when this method is called but must be unlocked by the method if a command is sent to the poller thread and isLocked set to false.

Implements XrdSys::IOEvents::Poller.

References XrdSys::IOEvents::Channel::GetEvents(), and XrdSys::IOEvents::Channel::GetFD().

bool XrdSys::IOEvents::PollE::Modify ( Channel *  cP,
int &  eNum,
const char **  eTxt,
bool &  isLocked 
) [protected, virtual]

Modify the event status of a channel. An implementation must be supplied. The channel is locked when this method is called but must be unlocked by the method if a command is sent to the poller thread and isLocked set to false.

Implements XrdSys::IOEvents::Poller.

References XrdSys::IOEvents::Channel::GetEvents(), and XrdSys::IOEvents::Channel::GetFD().

void XrdSys::IOEvents::PollE::Shutdown ( ) [protected, virtual]

Shutdown the poller. An implementation must be supplied. The shutdown method must release any allocated storage and close private file descriptors. The polling thread will have already been terminated and x-thread pipe closed. Warning: the derived destructor *must* call Stop() and do nothing else!

Implements XrdSys::IOEvents::Poller.

References close(), XrdSysMutex::Lock(), and XrdSysMutex::UnLock().


Member Data Documentation

struct epoll_event* XrdSys::IOEvents::PollE::pollTab [private]

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