[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 3/3] intr: Protect internals with a lock
From: |
Samuel Thibault |
Subject: |
Re: [PATCH 3/3] intr: Protect internals with a lock |
Date: |
Tue, 10 Dec 2024 13:19:17 +0100 |
Hello,
Sergey Bugaev, le mar. 10 déc. 2024 14:57:05 +0300, a ecrit:
> @@ -103,11 +105,15 @@ queue_intr (struct irqdev *dev, int id, user_intr_t *e)
> * disabled. Level-triggered interrupts would keep raising otherwise. */
> __disable_irq (dev->irq[id]);
>
> - spl_t s = splhigh ();
> +#ifdef LINUX_DEV
> + spl_t s = simple_lock_irq(&intr_lock);
> +#endif
Why only ifdef LINUX_DEV? AIUI We do want to always lock.
> e->n_unacked++;
> e->interrupts++;
> dev->tot_num_intr++;
> - splx (s);
> +#ifdef LINUX_DEV
> + simple_unlock_irq(s, &intr_lock);
> +#endif
>
> thread_wakeup ((event_t) &intr_thread);
> }