make interrupts thread-safe
branlwyd opened this issue · comments
Currently, devices must wait until a safe time (e.g. when cyclesElapsed()
is called) before they can call interrupt()
. This means if a device wants to interrupt due to an out-of-band event (such as keyboard input) they have to keep their own queue of interrupts. This leads to added logic & storage.
Investigate whether it will hurt performance to add locking, or perhaps replace the current interrupt queue with a lockless/low-lock queue structure.
Done in 2fb4e84.