From: Chenghai Huang huangchenghai2@huawei.com
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 91f1d73..6134239 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; }