[email protected] said: > Within ISR interrups are disabled unless you reenable it (with > enablenested attribute). > > For non-IRS: Yes, there is an attribute 'critical' (read doc.txt) > which does as follows: > > funct: > push r2 ; save status > dint ; disable ints > ...pushes > .... funct body follows > ...pops > reti ; restore r2 and return. >
Isn't there a potential problem with this? If an interrupt occurs between the push r2 and the dint, and the interrupt routine returns with interrupts disabled, interrupts will get reenabled by the reti. Or is this a case of "don't do that"? thanks, galen
