no, this _is_ what you want. remember that on UP, a kernel thread cannot
thread can be pre-empted unless it voluntarily blocks. this itself
guarantees mutual exclusion for your threads A and B. that's why spinlocks
are no-ops in UP.
what this means is that A and B do not run in "parallel". however,
interrupts may occur "in parallel" or asynchronous with A and B, so you
need to protect against them.
that's why you use spinlock_irqsave and spinlock_irqrestore to protect your
structures in A and B rather than plain spinlocks. they work out to
save_flags(flags);cli() and restore_flags(flags) in UP which is exactly
what you want.
ganesh
-
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/