11.07.2015 Views

IAR PowerPac RTOS User Guide

IAR PowerPac RTOS User Guide

IAR PowerPac RTOS User Guide

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

ReentranceAll routines that can be used from different tasks at the same time have to be fully reentrant. A routine is in use fromthe moment it is called until it returns or the task that has called it is terminated.All routines supplied with your real-time operating system are fully reentrant. If for some reason you need to have nonreentrantroutines in your program that can be used from more than one task, it is recommended to use a resourcesemaphore to avoid this kind of problem.C routines and reentranceNormally, the C compiler generates code that is fully reentrant. However, the compiler may have options that force itto generate non-reentrant code. It is recommended not to use these options, although it is possible to do so under certaincircumstances.Assembly routines and reentranceAs long as assembly functions access local variables and parameters only, they are fully reentrant. Everything else hasto be thought about carefully.PP<strong>RTOS</strong>-2 133

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!