Working on a simple OS I thought it might be useful to be able to poll
for interrupts when interrupts are disabled. I think there may be times
where it is acceptable to process certain kinds of interrupts even if
they were disable. So, I added a poll-for-interrupt instruction to the architecture. Which just checks for interrupts and continues if there is
not one. I have seen wait-for-interrupt instructions before, but not
sure about polling.
I also added a two-up-level return from interrupt instruction. I have
not seen this in other architectures, but I needed it at one point.
Interrupt information is stored on an internal stack, and it is tricky
(slow) to manipulate it for a two-up-level return. It is an eight level
stack with two or three words of information per level. It was a bit
much to copy it all in software, so I added the hardware return. But it
is a lot of extra hardware for a very rare occurrence.
Finding this discussion on interrupts informative. I have only done a
modicum of work on an OS; tried to get things working with spinlocks.
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 546 |
Nodes: | 16 (2 / 14) |
Uptime: | 04:22:06 |
Calls: | 10,387 |
Calls today: | 2 |
Files: | 14,061 |
Messages: | 6,416,782 |