From d0dfeda7d0afb7d0c52475ab882ad9df3902cc60 Mon Sep 17 00:00:00 2001 From: caochao Date: Wed, 23 Feb 2022 15:29:38 +0800 Subject: [PATCH] modify signal with broadcast for support multithread Signed-off-by: caochao Change-Id: Ifd4bb849035576d9a1b8499f7e00ed6b2b2c9278 --- samgr/adapter/posix/queue_adapter.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samgr/adapter/posix/queue_adapter.c b/samgr/adapter/posix/queue_adapter.c index 43416ca..420c6c1 100644 --- a/samgr/adapter/posix/queue_adapter.c +++ b/samgr/adapter/posix/queue_adapter.c @@ -53,7 +53,7 @@ int QUEUE_Put(MQueueId queueId, const void *element, uint8 pri, int timeout) int ret = LFQUE_Push(queue->queue, element, pri); pthread_mutex_unlock(&queue->wMutex); pthread_mutex_lock(&queue->rMutex); - pthread_cond_signal(&queue->cond); + pthread_cond_broadcast(&queue->cond); pthread_mutex_unlock(&queue->rMutex); return ret; } -- Gitee