next up previous contents index
Next: 3.9 Naked Functions Up: 3. Using SDCC Previous: 3.7 Interrupt Service Routines   Contents   Index

3.8 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.

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

The critical attribute maybe used with other attributes like reentrant.



Johan Knol
2001-07-13