tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: 4.x -> 5.x locking?

>>      membar_sync();
>>      mutex_exit(mtx);
> mutex_enter and mutex_exit are implicit memory barriers (reads and
> writes respectively are not allowed to be reordered).

Oh!  Thank you.  Has that made it into mutex(9) in -current?  If not, I
offer my opinion that it should.

Does mutex_exit also implicitly push writes to main RAM, or whatever
else is necessary to make them visible to other CPUs?  (A reordering
barrier does not necessarily imply a global visibility barrier.)

/~\ The ASCII                             Mouse
\ / Ribbon Campaign
 X  Against HTML      
/ \ Email!           7D C8 61 52 5D E7 2D 39  4E F1 31 3E E8 B3 27 4B

Home | Main Index | Thread Index | Old Index