Skip to content

Commit 5766adb

Browse files
authored
Merge pull request #5569 from OpenMathLib/revert-5479-forklock
Revert "[WIP,Testing] remove the lock around the thread shutdown function again"
2 parents 1f2bffb + eb098f6 commit 5766adb

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

driver/others/blas_server.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -982,6 +982,8 @@ int BLASFUNC(blas_thread_shutdown)(void){
982982

983983
int i;
984984

985+
LOCK_COMMAND(&server_lock);
986+
985987
//Free buffers allocated for threads
986988
for(i=0; i<MAX_CPU_NUMBER; i++){
987989
if(blas_thread_buffer[i]!=NULL){
@@ -1021,6 +1023,7 @@ int BLASFUNC(blas_thread_shutdown)(void){
10211023
blas_server_avail = 0;
10221024

10231025
}
1026+
UNLOCK_COMMAND(&server_lock);
10241027

10251028
return 0;
10261029
}

0 commit comments

Comments
 (0)