You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by GitBox <gi...@apache.org> on 2022/06/16 23:38:09 UTC
[GitHub] [tvm] supersat commented on a diff in pull request #11599: [Bugfix][Runtime] Fix sched_setaffinity in Android
supersat commented on code in PR #11599:
URL: https://github.com/apache/tvm/pull/11599#discussion_r899643038
##########
src/runtime/threading_backend.cc:
##########
@@ -164,9 +172,13 @@ class ThreadGroup::Impl {
CPU_SET(id, &cpuset);
}
#if defined(__ANDROID__)
- sched_setaffinity(thread, sizeof(cpu_set_t), &cpuset);
+ if (sched_setaffinity(tid, sizeof(cpu_set_t), &cpuset) == -1) {
Review Comment:
The man page also specifies that it returns -1 on failure, but that's for glibc. I looked at the bionic (Android C runtime) sources, and it also returns -1 on failure. Bionic tests seem to use a mix of != 0 and == -1.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org