bug-hurd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] libddekit: support new-style interrupt notifications


From: Justus Winter
Subject: [PATCH] libddekit: support new-style interrupt notifications
Date: Sun, 28 Feb 2016 00:42:10 +0100

* 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.
---
 libddekit/interrupt.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/libddekit/interrupt.c b/libddekit/interrupt.c
index 2618e50..acace56 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);
-- 
2.1.4




reply via email to

[Prev in Thread] Current Thread [Next in Thread]