Show
Ignore:
Timestamp:
12/02/07 14:52:52 (14 years ago)
Author:
ppalmers
Message:

have separate threads for every handler

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/libffado/src/libieee1394/IsoHandlerManager.h

    r752 r753  
    2727#include "debugmodule/debugmodule.h" 
    2828 
    29 #include "libutil/Thread.h" 
    30  
    3129#include <sys/poll.h> 
    3230#include <errno.h> 
     
    4038#define MAX_UPDATE_TRIES 10 
    4139class Ieee1394Service; 
    42 namespace Util { 
    43     class PosixThread; 
    44 } 
    4540 
    4641class IsoHandler; 
     
    6661 
    6762*/ 
    68 class IsoHandlerManager : public Util::RunnableInterface 
     63class IsoHandlerManager 
    6964{ 
    7065    friend class Streaming::StreamProcessorManager; 
     
    7772 
    7873        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() 
    8274 
    8375        void setVerboseLevel(int l); ///< set the verbose level 
     
    115107 
    116108        Ieee1394Service& get1394Service() {return m_service;}; 
    117     // RunnableInterface interface 
    118     public: 
    119         bool Execute(); // note that this is called in we while(running) loop 
    120         bool Init(); 
    121          
    122         // protects the operations on the lists  
    123         // (FIXME: should be changed into a lock-free approach) 
    124         pthread_mutex_t m_list_lock; 
    125109 
    126110    // the state machine 
     
    135119        enum eHandlerStates m_State; 
    136120        const char *eHSToString(enum eHandlerStates); 
    137     private: 
    138         /// iterate all child handlers 
    139         bool iterate(); 
    140121 
    141122    private: 
     
    159140        Streaming::StreamProcessorVector m_StreamProcessors; 
    160141 
    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 
    175143        bool m_realtime; 
    176144        int m_priority; 
    177         Util::PosixThread *m_isoManagerThread; 
    178145 
    179146        // debug stuff