libwd/0098-uadk-fix-the-failure-process-bug.patch
2023-12-08 11:56:44 +08:00

29 lines
728 B
Diff

From f7a2fb057185759708d8b9712608150c9dccafef Mon Sep 17 00:00:00 2001
From: Qi Tao <taoqi10@huawei.com>
Date: Mon, 4 Dec 2023 17:20:38 +0800
Subject: [PATCH 098/114] uadk: fix the failure process bug
After the sem_post operation of full_sem fails, it need to
restore empty_sem to ensure that resources are available.
Signed-off-by: Chenghai Huang <huangchenghai2@huawei.com>
---
wd_util.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/wd_util.c b/wd_util.c
index 10b0ab9..4867d63 100644
--- a/wd_util.c
+++ b/wd_util.c
@@ -1398,6 +1398,7 @@ err_out:
task_queue->cur_task--;
task_queue->prod = curr_prod;
pthread_mutex_unlock(&task_queue->lock);
+ sem_post(&task_queue->empty_sem);
return ret;
}
--
2.25.1