Browse Source

Ensure that a premature call to set_num_threads will not overwrite unrelated memory

tags/v0.3.24
Martin Kroeker GitHub 2 years ago
parent
commit
b34f19a365
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      driver/others/blas_server.c

+ 1
- 1
driver/others/blas_server.c View File

@@ -973,7 +973,7 @@ void goto_set_num_threads(int num_threads) {

increased_threads = 1;

for(i = blas_num_threads - 1; i < num_threads - 1; i++){
for(i = (blas_num_threads > 0) ? blas_num_threads - 1 : 0; i < num_threads - 1; i++){

atomic_store_queue(&thread_status[i].queue, (blas_queue_t *)0);
thread_status[i].status = THREAD_STATUS_WAKEUP;


Loading…
Cancel
Save