Use pthread_setname_np. This makes SetCurrentThreadName actually work (name shows up in debugger) on non-Windows.