|
xrootd
|


Public Member Functions | |
| PollPort (port_event_t *ptab, int numfd, int pfd, int pFD[2]) | |
| ~PollPort () | |
Static Public Member Functions | |
| static int | AllocMem (void **memP, int slots) |
Static Public Attributes | |
| static const int | pollOK = POLLIN | POLLRDNORM | POLLPRI | POLLOUT |
| static const int | pollRD = POLLIN | POLLRDNORM | POLLPRI |
| static const int | pollWR = POLLOUT |
Protected Member Functions | |
| void | Begin (XrdSysSemaphore *syncp, int &rc, const char **eMsg) |
| timespec_t * | BegTO (timespec_t &theTO) |
| 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 | |
| void | Dispatch (Channel *cP, int pollEv) |
| bool | Process () |
Private Attributes | |
| port_event_t * | pollTab |
| int | pollDfd |
| int | pollMax |
| XrdSys::IOEvents::PollPort::PollPort | ( | port_event_t * | ptab, |
| int | numfd, | ||
| int | pfd, | ||
| int | pFD[2] | ||
| ) | [inline] |
| XrdSys::IOEvents::PollPort::~PollPort | ( | ) | [inline] |
| int XrdSys::IOEvents::PollPort::AllocMem | ( | void ** | memP, |
| int | slots | ||
| ) | [static] |
| void XrdSys::IOEvents::PollPort::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().
| timespec_t* XrdSys::IOEvents::PollPort::BegTO | ( | timespec_t & | theTO | ) | [inline, protected] |
| void XrdSys::IOEvents::PollPort::Dispatch | ( | Channel * | cP, |
| int | pollEv | ||
| ) | [private] |
| void XrdSys::IOEvents::PollPort::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::PollPort::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::PollPort::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().
| bool XrdSys::IOEvents::PollPort::Process | ( | ) | [private] |
| void XrdSys::IOEvents::PollPort::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().
int XrdSys::IOEvents::PollPort::pollDfd [private] |
int XrdSys::IOEvents::PollPort::pollMax [private] |
const int XrdSys::IOEvents::PollPort::pollOK = POLLIN | POLLRDNORM | POLLPRI | POLLOUT [static] |
const int XrdSys::IOEvents::PollPort::pollRD = POLLIN | POLLRDNORM | POLLPRI [static] |
port_event_t* XrdSys::IOEvents::PollPort::pollTab [private] |
const int XrdSys::IOEvents::PollPort::pollWR = POLLOUT [static] |
1.7.6.1