From a4022d3fea696df788b236a686979f84b4aa4e80 Mon Sep 17 00:00:00 2001 From: Weili Qian Date: Tue, 31 May 2022 17:01:05 +0800 Subject: [PATCH 131/183] comp: remove the lock in async send 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 --- 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.27.0