[misc] Centralize thread naming plus name websocket thread

This commit is contained in:
ejurgensen
2021-07-05 21:40:31 +02:00
parent eae09039d5
commit d2f4efa1bf
13 changed files with 33 additions and 83 deletions

View File

@@ -35,9 +35,6 @@
#include <sys/ioctl.h>
#include <sys/queue.h>
#include <pthread.h>
#ifdef HAVE_PTHREAD_NP_H
# include <pthread_np.h>
#endif
#include <dlfcn.h>
#include <libspotify/api.h>
@@ -1575,11 +1572,7 @@ libspotify_init(void)
goto thread_fail;
}
#if defined(HAVE_PTHREAD_SETNAME_NP)
pthread_setname_np(tid_spotify, "spotify");
#elif defined(HAVE_PTHREAD_SET_NAME_NP)
pthread_set_name_np(tid_spotify, "spotify");
#endif
thread_setname(tid_spotify, "spotify");
DPRINTF(E_DBG, L_SPOTIFY, "Spotify init complete\n");
return 0;