已合并
IssueNo: https://gitcode.com/openharmony/kernel_liteos_a/issues/1062 #1346
IssueNo: https://gitcode.com/openharmony/kernel_liteos_a/issues/1062 #1346
已合并
yang-pangyuan创建于 3月24日
1 个文件变更+3-0
@@ -749,6 +749,7 @@ STATIC INLINE BOOL MqParamCheck(mqd_t personal, const char *msg, size_t msgLen)
749 */749 */
750static void MqSendNotify(struct mqarray *mqueueCB)750static void MqSendNotify(struct mqarray *mqueueCB)
751{751{
752+ UINT32 intSave;
752 struct mqnotify *mqnotify = &mqueueCB->mq_notify;753 struct mqnotify *mqnotify = &mqueueCB->mq_notify;
753 754 
754 if ((mqnotify->pid) && (mqueueCB->mqcb->readWriteableCnt[OS_QUEUE_READ] == 0)) {755 if ((mqnotify->pid) && (mqueueCB->mqcb->readWriteableCnt[OS_QUEUE_READ] == 0)) {
@@ -761,7 +762,9 @@ static void MqSendNotify(struct mqarray *mqueueCB)
761 info.si_signo = mqnotify->notify.sigev_signo;762 info.si_signo = mqnotify->notify.sigev_signo;
762 info.si_code = SI_MESGQ;763 info.si_code = SI_MESGQ;
763 info.si_value = mqnotify->notify.sigev_value;764 info.si_value = mqnotify->notify.sigev_value;
765+ SCHEDULER_LOCK(intSave);
764 OsDispatch(mqnotify->pid, &info, OS_USER_KILL_PERMISSION);766 OsDispatch(mqnotify->pid, &info, OS_USER_KILL_PERMISSION);
767+ SCHEDULER_UNLOCK(intSave);
765 break;768 break;
766 case SIGEV_NONE:769 case SIGEV_NONE:
767 default:770 default: