Merge branch 'v0.20.x'

This commit is contained in:
Max Kellermann
2018-01-05 10:10:17 +01:00
11 changed files with 150 additions and 48 deletions

View File

@@ -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) noexcept
@@ -69,7 +69,11 @@ SetThreadIdlePriority() noexcept
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);