From b0ad8a78ff9945864d046697ff5313ae0691cf49 Mon Sep 17 00:00:00 2001 From: Mark Seminatore Date: Thu, 28 Mar 2024 15:24:52 -0700 Subject: [PATCH] code to fix lost work in case of re-entrant calls to exec_blas_async() --- driver/others/blas_server_win32.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/driver/others/blas_server_win32.c b/driver/others/blas_server_win32.c index 2ad8b8c5f..788a23b0b 100644 --- a/driver/others/blas_server_win32.c +++ b/driver/others/blas_server_win32.c @@ -409,14 +409,14 @@ int exec_blas_async(BLASLONG pos, blas_queue_t *queue) { } else { - blas_queue_t *next_item = work_queue; + blas_queue_t *queue_item = work_queue; // find the end of the work queue - while (next_item) - next_item = next_item->next; + while (queue_item->next) + queue_item = queue_item->next; // add new work to the end - next_item = queue; + queue_item->next = queue; } LeaveCriticalSection(&queue_lock);