/[svn]/linuxsampler/trunk/src/common/Thread.cpp
ViewVC logotype

Diff of /linuxsampler/trunk/src/common/Thread.cpp

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

revision 1481 by senoner, Wed Nov 14 23:42:15 2007 UTC revision 1649 by nagata, Fri Jan 25 15:06:02 2008 UTC
# Line 150  int Thread::SignalStartThread() { Line 150  int Thread::SignalStartThread() {
150          RunningCondition.Set(false);          RunningCondition.Set(false);
151          return res;          return res;
152      }      }
153    
154      // Create and run the thread      // Create and run the thread
155      res = pthread_create(&this->__thread_id, &__thread_attr, __pthread_launcher, this);      res = pthread_create(&this->__thread_id, &__thread_attr, __pthread_launcher, this);
156      switch (res) {      switch (res) {
# Line 218  int Thread::SignalStopThread() { Line 219  int Thread::SignalStopThread() {
219      #else      #else
220      RunningCondition.Set(false);      RunningCondition.Set(false);
221      #endif      #endif
222  #else    #else
223      pthread_cancel(__thread_id);      pthread_cancel(__thread_id);
224  #endif    #endif  
225      return 0;      return 0;
# Line 375  DWORD WINAPI __win32thread_launcher(LPVO Line 376  DWORD WINAPI __win32thread_launcher(LPVO
376  #else  #else
377  /// Callback function for the POSIX thread API  /// Callback function for the POSIX thread API
378  static void* __pthread_launcher(void* thread) {  static void* __pthread_launcher(void* thread) {
379    #if !CONFIG_PTHREAD_TESTCANCEL
380      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
381    #endif
382    
383      Thread* t;      Thread* t;
384      t = (Thread*) thread;      t = (Thread*) thread;
385      t->SetSchedulingPriority();      t->SetSchedulingPriority();

Legend:
Removed from v.1481  
changed lines
  Added in v.1649

  ViewVC Help
Powered by ViewVC