Re: question: spinlocks and userspace.

Andrea Arcangeli (andrea@suse.de)
Wed, 10 Nov 1999 17:08:37 +0100 (CET)


On Wed, 10 Nov 1999, Ingo Molnar wrote:

>[..] This technique can be used for event-driven state
>machines, but cannot be used if the IRQ _must_ get access to that data

You have two different option to access data with this technique:

o queue a tq_immediate task, mark_bh, and try (down_trylock()) again
later ASAP
o queue a tq_scheduler task, mark_bh and call a blocking down() and
continue from kernel context (not from irq/bh context)

All depends on the latency you have to achieve.

Andrea

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/