Preface: I am not producing an Android app. I work for a software component business, creating shared libraries, compiled from C and C++ code, for use in third-party customers' apps. I test my libraries in a command-line test harness, which I run in the ADB shell. I am only producing software for 64-bit ARM, because none of the customers want 32-bit code.
One of my shared libraries can split its long tasks into several smaller packets, and create additional threads to run them in parallel for better performance. This is used on Windows, Mac and Linux. I have not enabled this functionality on Android yet, because customers aren't asking for it, and it would require a lot more routine testing.
I am designing interfaces to allow the applications that use this library to control the use of additional threads. As far as I've been able to discover, Android does not seem to have functions to control thread affinity, as of NDK21. One can set affinity for the whole process, with sched_setaffinity(), but not for individual threads.
Have I missed something? Has this been deliberately omitted from Android?
Thanks,
John Dallman