Merge pull request #3484 from martin-frbg/issue3481
Enable delayed (re)init of Windows threads beyond Cygwin
This commit is contained in:
commit
126ad48991
|
@ -40,7 +40,7 @@
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
|
|
||||||
#if defined(OS_CYGWIN_NT) && !defined(unlikely)
|
#if !defined(unlikely)
|
||||||
#ifdef __GNUC__
|
#ifdef __GNUC__
|
||||||
#define unlikely(x) __builtin_expect(!!(x), 0)
|
#define unlikely(x) __builtin_expect(!!(x), 0)
|
||||||
#else
|
#else
|
||||||
|
@ -391,8 +391,9 @@ int blas_thread_init(void){
|
||||||
|
|
||||||
int exec_blas_async(BLASLONG pos, blas_queue_t *queue){
|
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
|
// 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();
|
if (unlikely(blas_server_avail == 0)) blas_thread_init();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue