Merge pull request #1957 from martin-frbg/issue1954

Move TLS key deletion to openblas_quit
This commit is contained in:
Martin Kroeker 2019-01-10 12:04:08 +01:00 committed by GitHub
commit 21c0f2af7b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 8 additions and 5 deletions

View File

@ -1073,11 +1073,6 @@ static volatile int memory_initialized = 0;
}
free(table);
}
#if defined(OS_WINDOWS)
TlsFree(local_storage_key);
#else
pthread_key_delete(local_storage_key);
#endif
}
static void blas_memory_init(){
@ -1491,6 +1486,14 @@ void DESTRUCTOR gotoblas_quit(void) {
blas_shutdown();
#if defined(SMP)
#if defined(OS_WINDOWS)
TlsFree(local_storage_key);
#else
pthread_key_delete(local_storage_key);
#endif
#endif
#ifdef PROFILE
moncontrol (0);
#endif