Support get/set thread name on Android
Summary: This will add support to set and get thread name for Android. `pthread_setname_np` was introduced back in NDK API level 9: https://stackoverflow.com/questions/15241869/pthread-error-in-ndk-build?fbclid=IwAR0yvyaC4KNA6D1GlgIofQSFIuZAgL7qDR5L6m5tkY6lv-R6uTvzreAiFp4 Backwards support added for setting current thread name using `prctl(PR_SET_NAME)`, when `pthread_setname_np` is not available (for `__ANDROID_API__ < 9`). Currently, Android NDK does not support `pthread_getname_np` so `prctl(PR_GET_NAME)` is used for this. Reviewed By: yfeldblum Differential Revision: D17815151 fbshipit-source-id: 474caee070fad26f3e6b118307058d5506f0467b
Showing
Please register or sign in to comment