From b31349c22ad86f8aff3da5a5915b8d20861a1cd6 Mon Sep 17 00:00:00 2001 From: Martin Kroeker Date: Thu, 16 Dec 2021 16:58:12 +0100 Subject: [PATCH 1/2] Open up delayed (re)init to non-Cygwin OS as well --- driver/others/blas_server_win32.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/driver/others/blas_server_win32.c b/driver/others/blas_server_win32.c index 42f289441..874590a2b 100644 --- a/driver/others/blas_server_win32.c +++ b/driver/others/blas_server_win32.c @@ -391,8 +391,9 @@ int blas_thread_init(void){ int exec_blas_async(BLASLONG pos, blas_queue_t *queue){ -#if defined(SMP_SERVER) && defined(OS_CYGWIN_NT) +#if defined(SMP_SERVER) // Handle lazy re-init of the thread-pool after a POSIX fork + // on Cygwin or as delayed init when a static library is used if (unlikely(blas_server_avail == 0)) blas_thread_init(); #endif From 7a7fbb11c36db9dcc0348c9267a5b9957d85aeea Mon Sep 17 00:00:00 2001 From: Martin Kroeker Date: Thu, 16 Dec 2021 17:28:28 +0100 Subject: [PATCH 2/2] define "unlikely" on non-cygwin too --- driver/others/blas_server_win32.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/driver/others/blas_server_win32.c b/driver/others/blas_server_win32.c index 874590a2b..33b58f134 100644 --- a/driver/others/blas_server_win32.c +++ b/driver/others/blas_server_win32.c @@ -40,7 +40,7 @@ #include #include "common.h" -#if defined(OS_CYGWIN_NT) && !defined(unlikely) +#if !defined(unlikely) #ifdef __GNUC__ #define unlikely(x) __builtin_expect(!!(x), 0) #else