From 6544d30e42880a375337652e133c3c8a888a7597 Mon Sep 17 00:00:00 2001 From: Dan Luu Date: Fri, 12 Sep 2014 08:55:23 -0500 Subject: [PATCH] Fix segfault when gemm is called immediately after set_num_threads. --- driver/others/blas_server.c | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/driver/others/blas_server.c b/driver/others/blas_server.c index e2632c223..bc07bcb87 100644 --- a/driver/others/blas_server.c +++ b/driver/others/blas_server.c @@ -811,24 +811,6 @@ void goto_set_num_threads(int num_threads) { LOCK_COMMAND(&server_lock); increased_threads = 1; - - for(i = blas_num_threads - 1; i < num_threads - 1; i++){ - - thread_status[i].queue = (blas_queue_t *)NULL; - thread_status[i].status = THREAD_STATUS_WAKEUP; - - pthread_mutex_init(&thread_status[i].lock, NULL); - pthread_cond_init (&thread_status[i].wakeup, NULL); - -#ifdef NEED_STACKATTR - pthread_create(&blas_threads[i], &attr, - (void *)&blas_thread_server, (void *)i); -#else - pthread_create(&blas_threads[i], NULL, - (void *)&blas_thread_server, (void *)i); -#endif - } - blas_num_threads = num_threads; UNLOCK_COMMAND(&server_lock);