[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: 4.x -> 5.x locking?
> Do you mean that in this sequence:
> 1: CPU A: mutex_enter(mtx)
> 2: CPU A: x = 1
> 3: CPU A: mutex_exit(mtx)
> 4: CPU B: mutex_enter(mtx)
> 5: CPU B: dostuff(x);
> The value changed in step #2 is only guaranteed to be available on
> CPU B after Step #4 runs?
That's how I read Joerg's mail. My guess is that mutex_exit initiates
a push to RAM; mutex_enter makes sure any other CPUs' mutex_exits'
pushes to RAM have been noticed. (Of course, depending on the hardware
design, one or both of them may be no-ops...but depending on them to be
is a recipe for nasty surprises when you try to run on other hardware.)
Welcome to SMP. :-þ
/~\ The ASCII Mouse
\ / Ribbon Campaign
X Against HTML mouse%rodents-montreal.org@localhost
/ \ Email! 7D C8 61 52 5D E7 2D 39 4E F1 31 3E E8 B3 27 4B
Main Index |
Thread Index |