Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

Do I need to do anything to C source code that contains a #pragma interrupt_level directive when porting this code to an OCG compiler?

0
Posted

Do I need to do anything to C source code that contains a #pragma interrupt_level directive when porting this code to an OCG compiler?

0

The exact operation of this pragma has changed between non-OCG compilers and OCG compilers, but the pragma is used to convey the same meaning and typically code does not need to be changed when migrating. This pragma would be used with non-OCG compilers to indicate that a function is allowed to be called from main-line and interrupt code because the programmer has taken special steps to ensure that there will be no reentrancy issues. The pragma suppresses the error message that would otherwise occur. When using an OCG compiler, this pragma is used to indicate that the function duplication that would normally take place when a function is called from main-line and interrupt code should not be performed, again due to the fact that the programmer must have taken steps to ensure that reentrancy issues have been dealt with.

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123