@@ -300,8 +300,10 @@ DSP_STATUS WMD_MSG_Get(struct MSG_QUEUE *hMsgQueue,
if (LST_IsEmpty(hMsgQueue->msgUsedList))
SYNC_ResetEvent(hMsgQueue->hSyncEvent);
else {
+ (void)SYNC_LeaveCS(hMsgMgr->hSyncCS);
NTFY_Notify(hMsgQueue->hNtfy,
DSP_NODEMESSAGEREADY);
+ (void)SYNC_EnterCS(hMsgMgr->hSyncCS);
SYNC_SetEvent(hMsgQueue->hSyncEvent);
}
@@ -352,8 +354,10 @@ DSP_STATUS WMD_MSG_Get(struct MSG_QUEUE *hMsgQueue,
hMsgQueue->refCount--;
/* Reset the event if there are still queued messages */
if (!LST_IsEmpty(hMsgQueue->msgUsedList)) {
+ (void)SYNC_LeaveCS(hMsgMgr->hSyncCS);
NTFY_Notify(hMsgQueue->hNtfy,
DSP_NODEMESSAGEREADY);
+ (void)SYNC_EnterCS(hMsgMgr->hSyncCS);
SYNC_SetEvent(hMsgQueue->hSyncEvent);
}
/* Exit critical section */