TI工程师:
您好!
在我的工程中,使用ipc notify实现core0 和其余核之间进行一个简单的数据传递,core 0 向其它核发送notify, 其它核运行一个计算后,发送notify给core0. 后续还要执行类似的多核 同步的计算。程序开始运行了 IPC_start(), sendEvent_register()。前几次运行均正常。但运行几次后,会运行错误,提示 notify instance not yet registered for the processor.
请问这有可能是什么原因造成的。
void cbFxn(Uint16 procId, Uint16 lineId, Uint32 eventId, UArg arg, Uint32 payload)
{
recvProcId = procId;
inBuf_srptr=(SharedRegion_SRPTER)payload;
if(procId != masterProc)
{
recv_nums++;
if(recv_nums == 7)
{
recv_nums = 0;
Semaphore_post(semHandle);
}
}else
Semphore_post(semHandle);
}
注册代码 INTERRUPT_LINE= 0; EVENTID= 10
if (MultiProc_self() == masterProc)
{
status = Notify_registerEvent(sloverProc1, INTERRUPT_LINE, EVENTID,
(Notify_FnNotifyCbck)cbFxn, NULL);
status = Notify_registerEvent(sloverProc2, INTERRUPT_LINE, EVENTID,
(Notify_FnNotifyCbck)cbFxn, NULL);
status = Notify_registerEvent(sloverProc3, INTERRUPT_LINE, EVENTID,
(Notify_FnNotifyCbck)cbFxn, NULL);
status = Notify_registerEvent(sloverProc4, INTERRUPT_LINE, EVENTID,
(Notify_FnNotifyCbck)cbFxn, NULL);
status = Notify_registerEvent(sloverProc5, INTERRUPT_LINE, EVENTID,
(Notify_FnNotifyCbck)cbFxn, NULL);
status = Notify_registerEvent(sloverProc6, INTERRUPT_LINE, EVENTID,
(Notify_FnNotifyCbck)cbFxn, NULL);
status = Notify_registerEvent(sloverProc7, INTERRUPT_LINE, EVENTID,
(Notify_FnNotifyCbck)cbFxn, NULL);
}else
{
// 从核完成事件注册
status = Notify_registerEvent(masterProc, INTERRUPT_LINE, EVENTID,
(Notify_FnNotifyCbck)cbFxn, NULL);
}
Nancy Wang:
请勿重复发帖,在以下帖子中讨论。
e2echina.ti.com/…/606242