Merge "Make pthread_create report sched_setscheduler failures on LP64."
This commit is contained in:
commit
d9913b0b0d
@ -91,8 +91,10 @@ int _init_thread(pthread_internal_t* thread, bool add_to_thread_list) {
|
|||||||
struct sched_param param;
|
struct sched_param param;
|
||||||
param.sched_priority = thread->attr.sched_priority;
|
param.sched_priority = thread->attr.sched_priority;
|
||||||
if (sched_setscheduler(thread->tid, thread->attr.sched_policy, ¶m) == -1) {
|
if (sched_setscheduler(thread->tid, thread->attr.sched_policy, ¶m) == -1) {
|
||||||
// For backwards compatibility reasons, we just warn about failures here.
|
#if __LP64__
|
||||||
// error = errno;
|
// For backwards compatibility reasons, we only report failures on 64-bit devices.
|
||||||
|
error = errno;
|
||||||
|
#endif
|
||||||
__libc_format_log(ANDROID_LOG_WARN, "libc",
|
__libc_format_log(ANDROID_LOG_WARN, "libc",
|
||||||
"pthread_create sched_setscheduler call failed: %s", strerror(errno));
|
"pthread_create sched_setscheduler call failed: %s", strerror(errno));
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user