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 * |
23 |
|
|
24 |
#include "Thread.h" |
#include "Thread.h" |
25 |
|
|
26 |
|
namespace LinuxSampler { |
27 |
|
|
28 |
Thread::Thread(bool LockMemory, bool RealTime, int PriorityMax, int PriorityDelta) { |
Thread::Thread(bool LockMemory, bool RealTime, int PriorityMax, int PriorityDelta) { |
29 |
this->bLockedMemory = LockMemory; |
this->bLockedMemory = LockMemory; |
30 |
this->isRealTime = RealTime; |
this->isRealTime = RealTime; |
121 |
} |
} |
122 |
|
|
123 |
/** |
/** |
124 |
|
* Returns @c true in case the thread is currently running. |
125 |
|
*/ |
126 |
|
bool Thread::IsRunning() { |
127 |
|
return Running; |
128 |
|
} |
129 |
|
|
130 |
|
/** |
131 |
* Sets the process SCHED_FIFO policy, if max=1 then set at max priority, |
* Sets the process SCHED_FIFO policy, if max=1 then set at max priority, |
132 |
* else use min priority. delta is added to the priority so that we can |
* else use min priority. delta is added to the priority so that we can |
133 |
* for example set 3 SCHED_FIFO tasks to different priorities by specifying |
* for example set 3 SCHED_FIFO tasks to different priorities by specifying |
218 |
t = (Thread*) thread; |
t = (Thread*) thread; |
219 |
t->Destructor(); |
t->Destructor(); |
220 |
} |
} |
221 |
|
|
222 |
|
} // namespace LinuxSampler |