thread/Util: no ioprio_set() on Android due to seccomp/SIGSYS
This commit is contained in:
@@ -38,7 +38,7 @@
|
||||
#include <windows.h>
|
||||
#endif
|
||||
|
||||
#ifdef __linux__
|
||||
#if defined(__linux__) && !defined(ANDROID)
|
||||
|
||||
static int
|
||||
ioprio_set(int which, int who, int ioprio)
|
||||
@@ -69,7 +69,11 @@ SetThreadIdlePriority()
|
||||
sched_setscheduler(0, SCHED_IDLE, &sched_param);
|
||||
#endif
|
||||
|
||||
#ifndef ANDROID
|
||||
/* this system call is forbidden via seccomp on Android 8 and
|
||||
leads to crash (SIGSYS) */
|
||||
ioprio_set_idle();
|
||||
#endif
|
||||
|
||||
#elif defined(_WIN32)
|
||||
SetThreadPriority(GetCurrentThread(), THREAD_PRIORITY_IDLE);
|
||||
|
Reference in New Issue
Block a user