Read linux/Documentation/spinlocks.txt.
Basically, critical sections should usually be
spin_[un]lock_irq{save,restore}. This even evaluates down to
save_flags/cli/restore_flags on UP.
If your critical section need not be guarded against interrupts, you can
use the simpler and faster spin_[un]lock variants.
there are also reader/writer spinlocks, if your device accesses follow
that pattern.
jeff
-- Jeff Garzik | Only so many songs can be sung Building 1024 | with two lips, two lungs, and MandrakeSoft, Inc. | one tongue.- 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/