diff options
author | Justus Winter <justus@gnupg.org> | 2016-02-27 07:53:50 +0100 |
---|---|---|
committer | Justus Winter <justus@gnupg.org> | 2016-02-27 07:53:50 +0100 |
commit | 918d1166a87d4111ddefb477c9a45ee1c2dce169 (patch) | |
tree | 21d392de900b1b557ab5910c467661c60bf50170 | |
parent | 8feade18c5f5cd2054f84b5b6e76ea9c685148b1 (diff) |
libddekit: support new-style interrupt notifications
* libddekit/interrupt.c (irq_server): If a message with a valid reply
port arrives, deallocate that instead of calling 'device_intr_enable'
to re-enable the interrupt.
-rw-r--r-- | libddekit/interrupt.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/libddekit/interrupt.c b/libddekit/interrupt.c index 2618e50b..acace565 100644 --- a/libddekit/interrupt.c +++ b/libddekit/interrupt.c @@ -145,7 +145,11 @@ static void intloop(void *arg) params->handler(params->priv); /* If the irq has been disabled by the linux device, * we don't need to reenable the real one. */ - device_intr_enable (master_device, my_index, TRUE); + if (MACH_PORT_VALID (intr_header->intr_header.msgh_remote_port)) + mach_port_deallocate (mach_task_self (), + intr_header->intr_header.msgh_remote_port); + else + device_intr_enable (master_device, my_index, TRUE); if (ddekit_irq_ctrl[my_index].thread_exit) { ddekit_lock_unlock (&ddekit_irq_ctrl[my_index].irqlock); |