From 3cff33453884bad82319f195ecc29539e86245f3 Mon Sep 17 00:00:00 2001 From: Andrew Hicks Date: Tue, 16 Mar 2021 20:58:16 -0400 Subject: [PATCH 1/3] Fix error in FreeBSD --- thpool.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/thpool.c b/thpool.c index d320f8f..6eb7a93 100644 --- a/thpool.c +++ b/thpool.c @@ -18,6 +18,8 @@ #include #if defined(__linux__) #include +#elif defined(__FreeBSD__) +#include #endif #include "thpool.h" @@ -325,6 +327,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); #else err("thread_do(): pthread_setname_np is not supported on this system"); #endif From 40cd44cf891200bc68980593daaccaf810808961 Mon Sep 17 00:00:00 2001 From: Manos Date: Mon, 18 Dec 2023 14:27:54 +0100 Subject: [PATCH 2/3] Fix badge --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 43bc7ea..851e54e 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,5 @@ -[[![GitHub Actions](https://github.com/Pithikos/C-Thread-Pool/workflows/tests/badge.svg?branch=master)](https://github.com/api-platform/core/actions?query=workflow%3Atests+branch%3Amaster) +[![GitHub Actions](https://github.com/Pithikos/C-Thread-Pool/workflows/Tests/badge.svg?branch=master)](https://github.com/Pithikos/C-Thread-Pool/actions?query=workflow%3Atests+branch%3Amaster) + # C Thread Pool From 29e85feeea48ce6a07adc1541574026e4aab265a Mon Sep 17 00:00:00 2001 From: Manos Date: Mon, 18 Dec 2023 15:04:46 +0100 Subject: [PATCH 3/3] Merge ghost commits --- thpool.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/thpool.c b/thpool.c index 4c1aef7..52163f7 100644 --- a/thpool.c +++ b/thpool.c @@ -24,7 +24,8 @@ #include #if defined(__linux__) #include -#elif defined(__FreeBSD__) +#endif +#if defined(__FreeBSD__) || defined(__OpenBSD__) #include #endif @@ -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