next up previous contents index
Next: 3.10 Naked Functions Up: 3 Using SDCC Previous: 3.8 Interrupt Service Routines   Contents   Index

3.9 Critical Functions

<TODO: this isn't implemented at all!>

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.



Bernhard Held 2003-08-29