
When sending BD, a lock has been added in function 'hisi_qm_send' to ensure atomicity, so there is no need to repeat lock in function 'wd_do_comp_async'. Signed-off-by: Weili Qian <qianweili@huawei.com> --- wd_comp.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/wd_comp.c b/wd_comp.c index 1ae0e78..6bf5f82 100644 --- a/wd_comp.c +++ b/wd_comp.c @@ -692,17 +692,12 @@ int wd_do_comp_async(handle_t h_sess, struct wd_comp_req *req) msg->tag = tag; msg->stream_mode = WD_COMP_STATELESS; - pthread_spin_lock(&ctx->lock); - ret = wd_comp_setting.driver->comp_send(ctx->ctx, msg); if (unlikely(ret < 0)) { - pthread_spin_unlock(&ctx->lock); WD_ERR("wd comp send error, ret = %d!\n", ret); goto fail_with_msg; } - pthread_spin_unlock(&ctx->lock); - ret = wd_add_task_to_async_queue(&wd_comp_env_config, idx); if (unlikely(ret)) goto fail_with_msg; -- 2.33.0