mirror of
https://github.com/openharmony/distributedschedule_samgr_lite.git
synced 2026-07-19 17:13:31 -04:00
modify signal with broadcast for support multithread
Signed-off-by: caochao <caochao@huawei.com> Change-Id: Ifd4bb849035576d9a1b8499f7e00ed6b2b2c9278
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user