XrdPollE.hh

Go to the documentation of this file.
00001 #ifndef __XRD_POLLDEV_H__
00002 #define __XRD_POLLDEV_H__
00003 /******************************************************************************/
00004 /*                                                                            */
00005 /*                         X r d P o l l D e v . h h                          */
00006 /*                                                                            */
00007 /* (c) 2004 by the Board of Trustees of the Leland Stanford, Jr., University  */
00008 /*       All Rights Reserved. See XrdInfo.cc for complete License Terms       */
00009 /*   Produced by Andrew Hanushevsky for Stanford University under contract    */
00010 /*              DE-AC03-76-SFO0515 with the Department of Energy              */
00011 /******************************************************************************/
00012 
00013 //        $Id: XrdPollE.hh 24468 2008-06-22 16:47:03Z ganis $
00014 
00015 #include <sys/epoll.h>
00016 
00017 #include "Xrd/XrdPoll.hh"
00018   
00019 class XrdPollE : public XrdPoll
00020 {
00021 public:
00022 
00023        void Disable(XrdLink *lp, const char *etxt=0);
00024 
00025        int   Enable(XrdLink *lp);
00026 
00027        void Start(XrdSysSemaphore *syncp, int &rc);
00028 
00029             XrdPollE(struct epoll_event *ptab, int numfd, int pfd)
00030                        {PollTab = ptab; PollMax = numfd; PollDfd = pfd;}
00031            ~XrdPollE();
00032 
00033 protected:
00034        void  Exclude(XrdLink *lp);
00035        int   Include(XrdLink *lp);
00036        char *x2Text(unsigned int evf);
00037 
00038 private:
00039 void remFD(XrdLink *lp, unsigned int events);
00040 
00041 #ifdef EPOLLONESHOT
00042    static const int ePollOneShot = EPOLLONESHOT;
00043 #else
00044    static const int ePollOneShot = 0;
00045 #endif
00046    static const int ePollEvents = EPOLLIN  | EPOLLHUP | EPOLLPRI | EPOLLERR |
00047                                   ePollOneShot;
00048 
00049 struct epoll_event *PollTab;
00050        int          PollDfd;
00051        int          PollMax;
00052 };
00053 #endif

Generated on Tue Jul 5 14:46:15 2011 for ROOT_528-00b_version by  doxygen 1.5.1