summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libddekit/interrupt.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/libddekit/interrupt.c b/libddekit/interrupt.c
index 5a545f5a..9128e4d0 100644
--- a/libddekit/interrupt.c
+++ b/libddekit/interrupt.c
@@ -208,6 +208,11 @@ ddekit_thread_t *ddekit_interrupt_attach(int irq, int shared,
/* construct name */
snprintf(thread_name, 10, "irq%02X", irq);
+ ddekit_irq_ctrl[irq].handle_irq = 1; /* IRQ nesting level is initially 1 */
+ ddekit_lock_init_unlocked (&ddekit_irq_ctrl[irq].irqlock);
+ ddekit_irq_ctrl[irq].cond = ddekit_condvar_init ();
+ ddekit_irq_ctrl[irq].thread_exit = FALSE;
+
/* allocate irq */
/* create interrupt loop thread */
thread = ddekit_thread_create(intloop, params, thread_name);
@@ -215,12 +220,7 @@ ddekit_thread_t *ddekit_interrupt_attach(int irq, int shared,
ddekit_simple_free(params);
return NULL;
}
-
- ddekit_irq_ctrl[irq].handle_irq = 1; /* IRQ nesting level is initially 1 */
ddekit_irq_ctrl[irq].irq_thread = thread;
- ddekit_lock_init_unlocked (&ddekit_irq_ctrl[irq].irqlock);
- ddekit_irq_ctrl[irq].cond = ddekit_condvar_init ();
- ddekit_irq_ctrl[irq].thread_exit = FALSE;
/* wait for intloop initialization result */