← Back to context

Comment by magicalhippo

12 hours ago

For me, a x86 interrupt service routine that services a hardware interrupt[1] doesn't strike me as something I'd consider a function. It shouldn't return a value, and it typically has side effects. So why is it a function?

I mean trivially you could say it's a function from (entire machine state) to (entire machine state), but typically we ignore the trivial solution because it's not interesting.

[1]: https://alex.dzyoba.com/blog/os-interrupts/