Next Previous Contents

9. critical Functions.

A special keyword may be associated with a function declaring it as 'critical'. SDCC will generate code to disable all interrupts upon entry to a critical function and enable them back before returning . Note that nesting critical functions may cause unpredictable results.

eg

int foo () critical 
{ 
... 
... 
}
 

The critical attribute maybe used with other attributes like reentrant.


Next Previous Contents