Setting thread-name on BSD systems
Currently support for setting the name of a thread is implemented using either
pthread_setname_np(const char*) (Solaris) or
pthread_setname_np(pthread_t, const char*) (Linux).
The functionality is also available on BSD systems using
pthread_set_name_np (note the extra underscore between "name"), albeit slightly differently:
- On FreeBSD, DragonFlyBSD, and OpenBSD the function's signature matches that of Linux'
- On NetBSD the second argument is a printf-like string, which can refer to the value provided by the third argument
The getter's (
pthread_get_name_np) signature matches the Linux' version on all four except maybe on DragonFlyBSD, where it might still not exist.
<pthread_np.h> must be