Software v/s hardware interrupts

Which one has more precedence? Hardware or software interrupt? Does cli() and sei() act upon both kinds of interrupts??

There are no software interrupts, if that answers your question. :slight_smile:

http://www.gammon.com.au/interrupts

Thanks...it did help.

SO does cli() and sei() affect both external and timer generated interrupts??

It affects all interrupts, except Reset which strictly speaking isn't an interrupt.