Skip to content

Commit

Permalink
Merge Lambda0x00 master
Browse files Browse the repository at this point in the history
  • Loading branch information
Pithikos committed Dec 18, 2023
2 parents 9577c67 + 29e85fe commit 8c9e0ea
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions thpool.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@
#if defined(__linux__)
#include <sys/prctl.h>
#endif
#if defined(__FreeBSD__) || defined(__OpenBSD__)
#include <pthread_np.h>
#endif

#include "thpool.h"

Expand Down Expand Up @@ -342,6 +345,8 @@ static void* thread_do(struct thread* thread_p){
prctl(PR_SET_NAME, thread_name);
#elif defined(__APPLE__) && defined(__MACH__)
pthread_setname_np(thread_name);
#elif defined(__FreeBSD__) || defined(__OpenBSD__)
pthread_set_name_np(thread_p->pthread, thread_name);
#else
err("thread_do(): pthread_setname_np is not supported on this system");
#endif
Expand Down

0 comments on commit 8c9e0ea

Please sign in to comment.