Skip to content

Commit 126ad48

Browse files
authored
Merge pull request #3484 from martin-frbg/issue3481
Enable delayed (re)init of Windows threads beyond Cygwin
2 parents f67a062 + 7a7fbb1 commit 126ad48

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

driver/others/blas_server_win32.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
#include <stdlib.h>
4141
#include "common.h"
4242

43-
#if defined(OS_CYGWIN_NT) && !defined(unlikely)
43+
#if !defined(unlikely)
4444
#ifdef __GNUC__
4545
#define unlikely(x) __builtin_expect(!!(x), 0)
4646
#else
@@ -391,8 +391,9 @@ int blas_thread_init(void){
391391

392392
int exec_blas_async(BLASLONG pos, blas_queue_t *queue){
393393

394-
#if defined(SMP_SERVER) && defined(OS_CYGWIN_NT)
394+
#if defined(SMP_SERVER)
395395
// Handle lazy re-init of the thread-pool after a POSIX fork
396+
// on Cygwin or as delayed init when a static library is used
396397
if (unlikely(blas_server_avail == 0)) blas_thread_init();
397398
#endif
398399

0 commit comments

Comments
 (0)