Rafael,
> That is what I am still not very clear about. What is it meant when
> "another CPU enters". Is it that while that code segment of outb()'s is
> being executed, the same segment can be called from some other place? Or
> does it mean that line 3 gets executed by CPU0, line 3 by CPU1, line 4
> by CPU0, line 4 by CPU1, etc. All withing the same call to that
> function?
Once a thread starts executing on a particular processor, it won't jump from one
processor to the next. The thread will execute completely on one processor until
the thread terminates (or sleeps), and each instruction gets executed only once.
What Dave Jones meant was that, in an SMP system, it is possible for 2 different
threads to call the same function at the same time. When that happens, you get the
problem of simultaneous access he describes in his article. The problem can be
avoided with the use of spinlocks.
Hope this helps,
Juan
-
Linux SMP list: FIRST see FAQ at http://www.irisa.fr/prive/dmentre/smp-howto/
To Unsubscribe: send "unsubscribe linux-smp" to [EMAIL PROTECTED]