Message callback reentrancy

Hi all,

I would like to use message service to synchronize task with IRQ serrvices. I am not sure if the adl_msgHandler_f call-back function must be re-entry safe or not?

What I mean is: if a task sends a message and the IRQ service sends the message for the same handler, will it be called at the same time (ie. during execution of the handler it will be preempted and second instance will be called)? Or rather the handler will be called sequentially? The execution priority isn’t a problem, but function reentrancy is…


I’ll anwser myself to this question after spending enough time debugging it and reading through docs…

The message callback f-n doesn’t have to reentrysafe. It is called from the task execution context and this context has only one instance so it cannot interrupt itself. You can send message from the callback function to the same task and it will not lock in the loop or something.