mirror of
https://github.com/OpenMathLib/OpenBLAS
synced 2026-05-31 00:45:48 +08:00
Merge branch 'develop' into issue5414
This commit is contained in:
@@ -637,9 +637,7 @@ int exec_blas_async(BLASLONG pos, blas_queue_t *queue){
|
||||
|
||||
#ifdef SMP_SERVER
|
||||
// Handle lazy re-init of the thread-pool after a POSIX fork
|
||||
LOCK_COMMAND(&server_lock);
|
||||
if (unlikely(blas_server_avail == 0)) blas_thread_init();
|
||||
UNLOCK_COMMAND(&server_lock);
|
||||
#endif
|
||||
BLASLONG i = 0;
|
||||
blas_queue_t *current = queue;
|
||||
@@ -984,6 +982,8 @@ int BLASFUNC(blas_thread_shutdown)(void){
|
||||
|
||||
int i;
|
||||
|
||||
LOCK_COMMAND(&server_lock);
|
||||
|
||||
//Free buffers allocated for threads
|
||||
for(i=0; i<MAX_CPU_NUMBER; i++){
|
||||
if(blas_thread_buffer[i]!=NULL){
|
||||
@@ -1023,6 +1023,7 @@ int BLASFUNC(blas_thread_shutdown)(void){
|
||||
blas_server_avail = 0;
|
||||
|
||||
}
|
||||
UNLOCK_COMMAND(&server_lock);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user