Move TLS key deletion to openblas_quit
fixes #1954 (as suggested by thrasibule in that issue)
This commit is contained in:
parent
20d1aad13f
commit
ad2c386d6a
|
@ -1073,11 +1073,6 @@ static volatile int memory_initialized = 0;
|
||||||
}
|
}
|
||||||
free(table);
|
free(table);
|
||||||
}
|
}
|
||||||
#if defined(OS_WINDOWS)
|
|
||||||
TlsFree(local_storage_key);
|
|
||||||
#else
|
|
||||||
pthread_key_delete(local_storage_key);
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void blas_memory_init(){
|
static void blas_memory_init(){
|
||||||
|
@ -1491,6 +1486,14 @@ void DESTRUCTOR gotoblas_quit(void) {
|
||||||
|
|
||||||
blas_shutdown();
|
blas_shutdown();
|
||||||
|
|
||||||
|
#if defined(SMP)
|
||||||
|
#if defined(OS_WINDOWS)
|
||||||
|
TlsFree(local_storage_key);
|
||||||
|
#else
|
||||||
|
pthread_key_delete(local_storage_key);
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef PROFILE
|
#ifdef PROFILE
|
||||||
moncontrol (0);
|
moncontrol (0);
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue