Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[thread_pool] topology: Use sched_getaffinity on Android API >= 12 #2485

Closed
wants to merge 0 commits into from

Conversation

copybara-service[bot]
Copy link
Contributor

@copybara-service copybara-service bot commented Feb 24, 2025

[thread_pool] topology: Use sched_getaffinity on Android API >= 12

Previously, this was done with syscall(__NR_sched_getaffinity, ...) which
doesn't get the return value right. (I saw 8 (num cpus) instead of 0.)
It's not clear whether the syscall will work correctly for old Android
versions, but we'll try to support these old versions.

sched_getaffinity/sched_setaffinity were introduced in API level 12 (Honeycomb
MR1), released in 2011. https://apilevels.com/

NDK r15c raised the minimum API target level to 14 in 2017.
https://github.com/android/ndk/wiki/Changelog-r15

@copybara-service copybara-service bot force-pushed the test_730373336 branch 2 times, most recently from 173e82d to 77c99ce Compare February 24, 2025 12:58
@copybara-service copybara-service bot changed the title [thread_pool] topology: Use sched_getaffinity on Android [thread_pool] topology: Use sched_getaffinity on Android API >= 12 Feb 24, 2025
@copybara-service copybara-service bot closed this Feb 24, 2025
@copybara-service copybara-service bot deleted the test_730373336 branch February 24, 2025 13:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

0 participants