X-Git-Url: https://git.cinelerra-gg.org/git/?a=blobdiff_plain;f=cinelerra-5.1%2Fguicast%2Fthread.C;h=9908a6280d54e04706949a47f78ac85ee324dae2;hb=0c48864cab7b37268025485c6a227f36b3420030;hp=dff53e61ec4e5eb656a09236f4486ef680ee7484;hpb=7fd85fb66168f6b518c5f2d73e04036e87faa0e1;p=goodguy%2Fcinelerra.git diff --git a/cinelerra-5.1/guicast/thread.C b/cinelerra-5.1/guicast/thread.C index dff53e61..9908a628 100644 --- a/cinelerra-5.1/guicast/thread.C +++ b/cinelerra-5.1/guicast/thread.C @@ -28,6 +28,9 @@ #include #include #include "thread.h" +#if defined(__TERMUX__) +#include "bthread.h" +#endif Thread::Thread(int synchronous, int realtime, int autodelete) @@ -55,7 +58,7 @@ void* Thread::entrypoint(void *parameters) pthread_setcancelstate(PTHREAD_CANCEL_DISABLE, NULL); thread->cancel_enabled = false; -// Set realtime here seince it doesn't work in start +// Set realtime here since it doesn't work in start if( thread->realtime && getuid() == 0 ) { struct sched_param param = { sched_priority : 1 }; if(pthread_setschedparam(thread->tid, SCHED_RR, ¶m) < 0) @@ -102,8 +105,10 @@ void Thread::start() perror("Thread::start pthread_attr_setschedparam"); } else { +#if !defined(__TERMUX__) if(pthread_attr_setinheritsched(&attr, PTHREAD_INHERIT_SCHED) < 0) perror("Thread::start pthread_attr_setinheritsched"); +#endif } // autodelete may delete this immediately after create