-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
I am thinking of using a lock to simulate cli/sti. When local_irq_enable() or local_irq_save() is called, we hold the lock; when local_irq_restore() or local_irq_disable(), we release the lock. We can even provide nested locking support if local_irq_enable() or local_irq_save() is allowed to be called multiple times in the same thread.
A lock does not work - been there, done that. The problem is that you can call local_irq_disable() several times and then only call local_irq_enable() only once to reset everything, so the semantics are different from recursive locks.
L4Linux uses a threaded lock implementation for that reason, so we'll discuss reusing this idea.
Bjoern