Messages in this thread | | | From | (Alan Cox) | Subject | Re: When to save/restore_flags() vs cli/sti() | Date | Thu, 25 Feb 1999 18:28:30 +0000 (GMT) |
| |
> I'd like to know more details on when exactly it is safe to use the simpler > cli()/sti() combination over the save_flags()/restore_flags().
When you know interrupts were previously enabled and also know nobody will ever call the function now or in the future with interrupts disabled. In general I think "don't do it" is the answer.
The net code used to use both according to need but even by 1.2 it was mostly using save/restore - it was just causing too many bugs being clever
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/
| |