summaryrefslogtreecommitdiff
path: root/Source/Core/InputCommon/ControllerInterface/evdev/evdev.h
diff options
context:
space:
mode:
authorPierre Bourdon <delroth@gmail.com>2014-11-20 05:02:09 +0100
committerPierre Bourdon <delroth@gmail.com>2015-08-14 16:01:27 +0200
commita770cc0778c1e3be03dca9a9a92a63fc4414481f (patch)
treef32edadc9450269834a109b64791b23d6f1a4fe1 /Source/Core/InputCommon/ControllerInterface/evdev/evdev.h
parent8f3302419b20c881ab6a9c0185bd7f05ceaf8c5f (diff)
DSPHLE MailHandler: Synchronize reads and interrupts
This change is meant to solve the following problem: how to translate the following snippet to DSPHLE: SendInterruptAndWaitRead(MAIL_A); SendAndWaitRead(MAIL_B); SendInterruptAndWaitRead(MAIL_C); This should cause the following actions on the CPU side: ---> Woken up by interrupt Reads MAIL_A Reads MAIL_B <--- Exits interrupt handler ---> Woken up by interrupt Reads MAIL_C <--- But with the current DSPHLE mail support, the following would happen because the "AndWaitRead" part is not supported: ---> Woken up by interrupt Reads MAIL_A Reads MAIL_B <--- Exits interrupt handler [Never gets the second interrupt since it was triggered at the same time as the first one! Misses MAIL_C.] This changes fixes the issue by storing two values in the mail queue on the DSP side: the value of the mail itself, and whether a read of that mail should trigger a DSP interrupt. If nothing is in the queue yet and an interrupt is requested, just trigger the interrupt. In the present example, the queue will look like this: Mail value Interrupt requested MAIL_A No <-- Interrupt was triggered when pushing the mail to the queue. MAIL_B Yes MAIL_C No When the CPU will read MAIL_B, this will cause MailHandler to trigger the interrupt, which will be handled by the CPU when coming back from the exception handler. MAIL_C is then successfully read.
Diffstat (limited to 'Source/Core/InputCommon/ControllerInterface/evdev/evdev.h')
0 files changed, 0 insertions, 0 deletions