31 |
|
|
32 |
namespace LinuxSampler { |
namespace LinuxSampler { |
33 |
|
|
34 |
|
// Callback functions for the POSIX thread API |
35 |
|
static void* __pthread_launcher(void* thread); |
36 |
|
static void __pthread_destructor(void* thread); |
37 |
|
|
38 |
Thread::Thread(bool LockMemory, bool RealTime, int PriorityMax, int PriorityDelta) { |
Thread::Thread(bool LockMemory, bool RealTime, int PriorityMax, int PriorityDelta) { |
39 |
this->bLockedMemory = LockMemory; |
this->bLockedMemory = LockMemory; |
40 |
this->isRealTime = RealTime; |
this->isRealTime = RealTime; |
243 |
} |
} |
244 |
|
|
245 |
/// Callback function for the POSIX thread API |
/// Callback function for the POSIX thread API |
246 |
void* __pthread_launcher(void* thread) { |
static void* __pthread_launcher(void* thread) { |
247 |
pthread_setcanceltype(PTHREAD_CANCEL_ASYNCHRONOUS, NULL); // let the thread be killable under any circumstances |
pthread_setcanceltype(PTHREAD_CANCEL_ASYNCHRONOUS, NULL); // let the thread be killable under any circumstances |
248 |
Thread* t; |
Thread* t; |
249 |
t = (Thread*) thread; |
t = (Thread*) thread; |
255 |
} |
} |
256 |
|
|
257 |
/// Callback function for the POSIX thread API |
/// Callback function for the POSIX thread API |
258 |
void __pthread_destructor(void* thread) { |
static void __pthread_destructor(void* thread) { |
259 |
Thread* t; |
Thread* t; |
260 |
t = (Thread*) thread; |
t = (Thread*) thread; |
261 |
t->Destructor(); |
t->Destructor(); |