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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]