Fix: different pthread_getname_np signature() on macOS causes build failure macOS likes to be special so it has pthread_setname_np() without a thread id parameter, but a pthread_getname_np() with it. Split the detection macro in two and modifiy the compat layer to handle it. Change-Id: I8034c54057d68eef59546960c75afe8fbe07f5ad Signed-off-by: Michael Jeanson <mjeanson@efficios.com> Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Add common util to set thread name Use the same code to set all the thread names and fail gracefully on platforms that don't support them. This sets the minimum requirement for thread names on Linux to Glibc >= 2.12, which seems reasonable. Signed-off-by: Michael Jeanson <mjeanson@efficios.com> Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com> Change-Id: I61c0b9adb6c2309fed91b5a1b11ebc5ee2a637ce