3 |
* LinuxSampler - modular, streaming capable sampler * |
* LinuxSampler - modular, streaming capable sampler * |
4 |
* * |
* * |
5 |
* Copyright (C) 2003, 2004 by Benno Senoner and Christian Schoenebeck * |
* Copyright (C) 2003, 2004 by Benno Senoner and Christian Schoenebeck * |
6 |
|
* Copyright (C) 2005 - 2007 Christian Schoenebeck * |
7 |
* * |
* * |
8 |
* This program is free software; you can redistribute it and/or modify * |
* This program is free software; you can redistribute it and/or modify * |
9 |
* it under the terms of the GNU General Public License as published by * |
* it under the terms of the GNU General Public License as published by * |
33 |
#include <pthread.h> |
#include <pthread.h> |
34 |
#include <errno.h> |
#include <errno.h> |
35 |
|
|
36 |
|
namespace LinuxSampler { |
37 |
|
|
38 |
/// 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. |
39 |
class Thread { |
class Thread { |
40 |
public: |
public: |
44 |
virtual int StopThread(); |
virtual int StopThread(); |
45 |
virtual int SignalStartThread(); |
virtual int SignalStartThread(); |
46 |
virtual int SignalStopThread(); |
virtual int SignalStopThread(); |
47 |
virtual bool IsRunning() { return Running; } |
virtual bool IsRunning(); |
48 |
virtual int SetSchedulingPriority(); //FIXME: should be private |
virtual int SetSchedulingPriority(); //FIXME: should be private |
49 |
virtual int LockMemory(); //FIXME: should be private |
virtual int LockMemory(); //FIXME: should be private |
50 |
virtual void EnableDestructor(); //FIXME: should be private |
virtual void EnableDestructor(); //FIXME: should be private |
67 |
void* __pthread_launcher(void* thread); |
void* __pthread_launcher(void* thread); |
68 |
void __pthread_destructor(void* thread); |
void __pthread_destructor(void* thread); |
69 |
|
|
70 |
|
} // namespace LinuxSampler |
71 |
|
|
72 |
#endif // __THREAD_H__ |
#endif // __THREAD_H__ |