Skip to content

Commit

Permalink
Merge ghost commits
Browse files Browse the repository at this point in the history
  • Loading branch information
Pithikos committed Dec 18, 2023
1 parent a4cdd69 commit 29e85fe
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions thpool.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@
#include <time.h>
#if defined(__linux__)
#include <sys/prctl.h>
#elif defined(__FreeBSD__)
#endif
#if defined(__FreeBSD__) || defined(__OpenBSD__)
#include <pthread_np.h>
#endif

Expand Down Expand Up @@ -341,8 +342,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__)
pthread_set_name_np(pthread_self(), 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 29e85fe

Please sign in to comment.