Fixed build in termux environment, thanks Imran Yusuff.
This commit is contained in:
parent
6cc152e26f
commit
47527d48ee
2 changed files with 11 additions and 0 deletions
|
@ -70,6 +70,10 @@ void Cpu::setAffinity(int id, uint64_t mask)
|
|||
sched_setaffinity(0, sizeof(&set), &set);
|
||||
# endif
|
||||
} else {
|
||||
# ifndef __ANDROID__
|
||||
pthread_setaffinity_np(pthread_self(), sizeof(&set), &set);
|
||||
# else
|
||||
sched_setaffinity(gettid(), sizeof(&set), &set);
|
||||
# endif
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue