Small documentation updates
[senf.git] / Scheduler / Scheduler.hh
index 7696a64..421325d 100644 (file)
@@ -37,7 +37,7 @@
 #include <boost/call_traits.hpp>
 #include <boost/integer.hpp>
 #include "ClockService.hh"
-#include "../Utils/Logger/Target.hh"
+#include "../Utils/Logger.hh"
 
 //#include "scheduler.mpp"
 ///////////////////////////////hh.p////////////////////////////////////////
@@ -153,11 +153,17 @@ namespace senf {
         wait for signals \e only.
 
         \todo Fix EventId parameter (probably to int) to allow |-ing without casting ...
+        
+        \todo Fix the file support to use threads (?) fork (?) and a pipe so it works reliably even
+            over e.g. NFS.
       */
     class Scheduler
         : boost::noncopyable
     {
     public:
+
+        SENF_LOG_CLASS_AREA();
+
         ///////////////////////////////////////////////////////////////////////////
         // Types
 
@@ -275,6 +281,7 @@ namespace senf {
         void unregisterSignal(unsigned signal);
                                         ///< Remove signal handler for \a signal
 
+        /// The signal number passed to registerSignal or unregisterSignal is invalid
         struct InvalidSignalNumberException : public std::exception
         { virtual char const * what() const throw() 
                 { return "senf::Scheduler::InvalidSignalNumberException"; } };
@@ -317,7 +324,11 @@ namespace senf {
             FdCallback cb_prio;
             FdCallback cb_write;
 
+            EventSpec() : file(false) {}
+
             int epollMask() const;
+
+            bool file;
         };
 
         /** \brief Timer event specification
@@ -341,6 +352,7 @@ namespace senf {
 
         typedef std::map<int,EventSpec> FdTable;
         typedef std::map<unsigned,TimerSpec> TimerMap; // sorted by id
+        typedef std::vector<unsigned> FdEraseList;
 
 #       ifndef DOXYGEN
 
@@ -361,6 +373,8 @@ namespace senf {
         typedef std::vector<SimpleCallback> SigHandlers;
 
         FdTable fdTable_;
+        FdEraseList fdErase_;
+        unsigned files_;
 
         unsigned timerIdCounter_;
         TimerQueue timerQueue_;