Spin locks and software IRQs.

[ Available lists | Index of freebsd-drivers | Month of May 2008 | Week of 16 May 2008 | Raw email | View thread | Wrap long lines | Reply | Tag ]
From
n4ti1us <gaspar_i@yahoo.com>
Date
16 May 2008 15:57:05
Subject
Spin locks and software IRQs.
Message-ID
17277776.post@talk.nabble.com

Replies
Referenced by

[ Hide this part ]
 
Hi All,

I was looking at the linux kernel, and in the implementation of spinlocks,
one can use different functions. One of them is spin_lock_bh(). What it does
is it creates a spin lock and disables the software irqs.

In FreeBSD on the other hand, the implementation of spinlocks is done by
mtx_lock_spin (which is actually a macro that calls mtx_lock_spin_flags())
but the problem is that is disables all the irq vector (at the bottom of the
stack it executes an "cli"). Is there any way one can implement spinlocks
that only disable the bottom half (sof irq)?

Alternatively, what would be the best way to manualy disable the soft irqs?

And all this makes me think... Why has nobody implemented a "_bh" version so
far? Is this an architectural decision, or is it just me being blind?
--
View this message in context: http://www.nabble.com/Spin-locks-and-software-IRQs.-tp17277776p17277776.html
Sent from the freebsd-drivers mailing list archive at Nabble.com.


Elapsed time: 0.092 seconds