Other Parts Discussed in Thread: SYSBIOS
Dear Support Team,
We have one ISR hooked to multiple digital input interrupts; below is the code snippet. Message Queue (sMsgQId) is shared between multiple interrupts. I see queue updates inside Mailbox_post() is protected by Hwi_disable and Hwi_restore. All other variables used inside IsrCallback are local variable. Do you see any other loophole inside IsrCallback by which re-entrancy can be broken?
VOID
DigitalIO::IsrCallback(UINT32 gpioHwId)
{
UINT32 hwState = 0;
HalErr halError = HalGpioRead(static_cast<HalGpioId>(gpioHwId),
&hwState);
if (HAL_EOK == halError)
{
IOControlMsgData msgTxBuffer;
msgTxBuffer.hwId = static_cast<HalGpioId>(gpioHwId);
msgTxBuffer.hwState = hwState;
if (nullptr != DigitalIO::sMsgQId)
{
OsaMsgQSend(DigitalIO::sMsgQId,
static_cast<VOID*>(&msgTxBuffer),
sizeof(IOControlMsgData),
OSA_NO_WAIT);
}
}
}
Thanks
Abhijit