35 |
/// 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. |
36 |
class Thread { |
class Thread { |
37 |
public: |
public: |
38 |
Thread(bool RealTime, int PriorityMax, int PriorityDelta); |
Thread(bool LockMemory, bool RealTime, int PriorityMax, int PriorityDelta); |
39 |
virtual ~Thread(); |
virtual ~Thread(); |
40 |
virtual int StartThread(); |
virtual int StartThread(); |
41 |
virtual int StopThread(); |
virtual int StopThread(); |
43 |
virtual int SignalStopThread(); |
virtual int SignalStopThread(); |
44 |
virtual bool IsRunning() { return Running; } |
virtual bool IsRunning() { return Running; } |
45 |
virtual int SetSchedulingPriority(); //FIXME: should be private |
virtual int SetSchedulingPriority(); //FIXME: should be private |
46 |
|
virtual int LockMemory(); //FIXME: should be private |
47 |
virtual void EnableDestructor(); //FIXME: should be private |
virtual void EnableDestructor(); //FIXME: should be private |
48 |
virtual int Destructor(); //FIXME: should be private |
virtual int Destructor(); //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. FIXME: should be protected |
virtual int Main() = 0; ///< This method needs to be implemented by the descendant and is the entry point for the new thread. FIXME: should be protected |
57 |
int PriorityDelta; |
int PriorityDelta; |
58 |
bool Running; |
bool Running; |
59 |
bool isRealTime; |
bool isRealTime; |
60 |
|
bool bLockedMemory; |
61 |
}; |
}; |
62 |
|
|
63 |
// Callback functions for the POSIX thread API |
// Callback functions for the POSIX thread API |