diff --git a/android/JackAndroidThread.cpp b/android/JackAndroidThread.cpp index b30dc78..ac58baf 100644 --- a/android/JackAndroidThread.cpp +++ b/android/JackAndroidThread.cpp @@ -125,27 +125,6 @@ int JackAndroidThread::StartImp(jack_native_thread_t* thread, int priority, int return -1; } - if (realtime) { - - jack_log("JackAndroidThread::StartImp : create RT thread"); - - if ((res = pthread_attr_setschedpolicy(&attributes, JACK_SCHED_POLICY))) { - jack_error("Cannot set RR scheduling class for RT thread res = %d", res); - return -1; - } - - memset(&rt_param, 0, sizeof(rt_param)); - rt_param.sched_priority = priority; - - if ((res = pthread_attr_setschedparam(&attributes, &rt_param))) { - jack_error("Cannot set scheduling priority for RT thread res = %d", res); - return -1; - } - - } else { - jack_log("JackAndroidThread::StartImp : create non RT thread"); - } - if ((res = pthread_attr_setstacksize(&attributes, THREAD_STACK))) { jack_error("Cannot set thread stack size res = %d", res); return -1; @@ -238,27 +217,6 @@ int JackAndroidThread::AcquireSelfRealTime(int priority) } int JackAndroidThread::AcquireRealTimeImp(jack_native_thread_t thread, int priority) { - struct sched_param rtparam; - int res; - memset(&rtparam, 0, sizeof(rtparam)); - rtparam.sched_priority = priority; - - jack_log("JackAndroidThread::AcquireRealTimeImp priority = %d", priority); - -#ifndef JACK_ANDROID_REALTIME_SCHED - if ((res = pthread_setschedparam(thread, JACK_SCHED_POLICY, &rtparam)) != 0) { - jack_error("Cannot use real-time scheduling (RR/%d)" - "(%d: %s)", rtparam.sched_priority, res, - strerror(res)); - return -1; - } -#else - if ((res = android::requestPriority(getpid(), gettid(), priority)) != 0) { - jack_log("Failed to get SCHED_FIFO priority pid %d tid %d; error %d", - getpid(), gettid(), res); - return -1; - } -#endif return 0; } @@ -274,15 +232,6 @@ int JackAndroidThread::DropSelfRealTime() int JackAndroidThread::DropRealTimeImp(jack_native_thread_t thread) { - struct sched_param rtparam; - int res; - memset(&rtparam, 0, sizeof(rtparam)); - rtparam.sched_priority = 0; - - if ((res = pthread_setschedparam(thread, SCHED_OTHER, &rtparam)) != 0) { - jack_error("Cannot switch to normal scheduling priority(%s)", strerror(errno)); - return -1; - } return 0; } diff --git a/posix/JackShmMem_os.h b/posix/JackShmMem_os.h index b572342..5e71b51 100644 --- a/posix/JackShmMem_os.h +++ b/posix/JackShmMem_os.h @@ -24,9 +24,9 @@ #include #include -#define CHECK_MLOCK(ptr, size) (mlock((ptr), (size)) == 0) -#define CHECK_MUNLOCK(ptr, size) (munlock((ptr), (size)) == 0) -#define CHECK_MLOCKALL() (mlockall(MCL_CURRENT | MCL_FUTURE) == 0) -#define CHECK_MUNLOCKALL() (munlockall() == 0) +#define CHECK_MLOCK(ptr, size) (TRUE) +#define CHECK_MUNLOCK(ptr, size) (TRUE) +#define CHECK_MLOCKALL() (TRUE) +#define CHECK_MUNLOCKALL() (TRUE) #endif