pthread: Set name of thread for easier debugging on FreeBSD

This commit is contained in:
Bernhard Froehlich 2014-01-08 14:39:26 +00:00
parent 727357e1bd
commit 4559e36dc1

View file

@ -97,9 +97,12 @@ thread_wrapper ( void *p )
{
struct thread_state *ts = p;
#ifdef PLATFORM_LINUX
#if defined(PLATFORM_LINUX)
/* Set name */
prctl(PR_SET_NAME, ts->name);
#elif defined(PLATFORM_FREEBSD)
/* Set name of thread */
pthread_set_name_np(pthread_self(), ts->name);
#endif
/* Run */