In this chapter, we'll focus on a really key aspect of writing a device driver: what hardware interrupts are and, more importantly, how exactly you, as a driver author, handle them. The fact is, a large percentage of peripherals (that you're interested in writing a device driver for) indicate their need for immediate action via the OS or driver by asserting a hardware interrupt. This is, in effect, an electrical signal that ultimately alerts the processor's control unit (typically, this alert must redirect control to the affected peripheral's interrupt handler routine as it requires immediate attention).
To handle these kinds of interrupts, you need to understand some of the fundamentals of how they work; that is, how the OS handles them and, most importantly, how you as a driver author are expected to work with them. An additional...