Merge Lambda0x00 master

This commit is contained in:
Manos 2023-12-18 15:38:26 +01:00
commit 8c9e0ea8d7

View File

@ -28,6 +28,9 @@
#if defined(__linux__) #if defined(__linux__)
#include <sys/prctl.h> #include <sys/prctl.h>
#endif #endif
#if defined(__FreeBSD__) || defined(__OpenBSD__)
#include <pthread_np.h>
#endif
#include "thpool.h" #include "thpool.h"
@ -342,6 +345,8 @@ static void* thread_do(struct thread* thread_p){
prctl(PR_SET_NAME, thread_name); prctl(PR_SET_NAME, thread_name);
#elif defined(__APPLE__) && defined(__MACH__) #elif defined(__APPLE__) && defined(__MACH__)
pthread_setname_np(thread_name); pthread_setname_np(thread_name);
#elif defined(__FreeBSD__) || defined(__OpenBSD__)
pthread_set_name_np(thread_p->pthread, thread_name);
#else #else
err("thread_do(): pthread_setname_np is not supported on this system"); err("thread_do(): pthread_setname_np is not supported on this system");
#endif #endif