Changeset 753 for trunk/libffado/src/libieee1394/IsoHandlerManager.h
- Timestamp:
- 12/02/07 14:52:52 (14 years ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/libffado/src/libieee1394/IsoHandlerManager.h
r752 r753 27 27 #include "debugmodule/debugmodule.h" 28 28 29 #include "libutil/Thread.h"30 31 29 #include <sys/poll.h> 32 30 #include <errno.h> … … 40 38 #define MAX_UPDATE_TRIES 10 41 39 class Ieee1394Service; 42 namespace Util {43 class PosixThread;44 }45 40 46 41 class IsoHandler; … … 66 61 67 62 */ 68 class IsoHandlerManager : public Util::RunnableInterface63 class IsoHandlerManager 69 64 { 70 65 friend class Streaming::StreamProcessorManager; … … 77 72 78 73 bool setThreadParameters(bool rt, int priority); 79 80 void setPollTimeout(int t) {m_poll_timeout=t;}; ///< set the timeout used for poll()81 int getPollTimeout() {return m_poll_timeout;}; ///< get the timeout used for poll()82 74 83 75 void setVerboseLevel(int l); ///< set the verbose level … … 115 107 116 108 Ieee1394Service& get1394Service() {return m_service;}; 117 // RunnableInterface interface118 public:119 bool Execute(); // note that this is called in we while(running) loop120 bool Init();121 122 // protects the operations on the lists123 // (FIXME: should be changed into a lock-free approach)124 pthread_mutex_t m_list_lock;125 109 126 110 // the state machine … … 135 119 enum eHandlerStates m_State; 136 120 const char *eHSToString(enum eHandlerStates); 137 private:138 /// iterate all child handlers139 bool iterate();140 121 141 122 private: … … 159 140 Streaming::StreamProcessorVector m_StreamProcessors; 160 141 161 // poll stuff 162 int m_poll_timeout; 163 // FD map sync requested 164 int32_t m_request_fdmap_update; 165 void updateShadowVars(); 166 167 // shadow variables 168 struct pollfd m_poll_fds_shadow[FFADO_MAX_ISO_HANDLERS_PER_PORT]; 169 IsoHandler *m_IsoHandler_map_shadow[FFADO_MAX_ISO_HANDLERS_PER_PORT]; 170 unsigned int m_poll_nfds_shadow; 171 172 void requestShadowUpdate(); 173 174 // threading 142 // thread params for the handler threads 175 143 bool m_realtime; 176 144 int m_priority; 177 Util::PosixThread *m_isoManagerThread;178 145 179 146 // debug stuff