/[svn]/linuxsampler/trunk/src/thread.h
ViewVC logotype

Diff of /linuxsampler/trunk/src/thread.h

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 9 by schoenebeck, Wed Nov 5 14:47:10 2003 UTC revision 13 by schoenebeck, Fri Nov 21 15:07:23 2003 UTC
# Line 32  Line 32 
32  #include <pthread.h>  #include <pthread.h>
33  #include <errno.h>  #include <errno.h>
34    
35  /// Callback function for the POSIX thread API  // Callback functions for the POSIX thread API
36  void* __pthread_launcher(void* thread);  void* __pthread_launcher(void* thread);
37    void  __pthread_destructor(void* thread);
38    
39  /// Abstract base class for classes that need to run in an own thread.  /// Abstract base class for classes that need to run in an own thread.
40  class Thread {  class Thread {
# Line 42  class Thread { Line 43  class Thread {
43          virtual ~Thread();          virtual ~Thread();
44          virtual int  StartThread();          virtual int  StartThread();
45          virtual int  StopThread();          virtual int  StopThread();
46            virtual int  SignalStopThread();
47          virtual bool IsRunning() { return Running; }          virtual bool IsRunning() { return Running; }
48          virtual int  SetSchedulingPriority(); //FIXME: should be private          virtual int  SetSchedulingPriority(); //FIXME: should be private
49          virtual int Main() = 0; ///< This method needs to be implemented by the descendant and is the entry point for the new thread.          virtual void EnableDestructor();      //FIXME: should be private
50            virtual int  Destructor();            //FIXME: should be private
51            virtual int  Main() = 0; ///< This method needs to be implemented by the descendant and is the entry point for the new thread.
52      private:      private:
53          pthread_t __thread_id;          pthread_t       __thread_id;
54          int       PriorityMax;          pthread_key_t   __thread_destructor_key;
55          int       PriorityDelta;          pthread_mutex_t __thread_state_mutex;
56          bool      Running;          pthread_cond_t  __thread_exit_condition;
57          bool      isRealTime;          int             PriorityMax;
58            int             PriorityDelta;
59            bool            Running;
60            bool            isRealTime;
61  };  };
62    
63  #endif // __THREAD_H__  #endif // __THREAD_H__

Legend:
Removed from v.9  
changed lines
  Added in v.13

  ViewVC Help
Powered by ViewVC