Subj : Re: Memory visibility and MS Interlocked instructions To : comp.programming.threads From : Joe Seigh Date : Fri Aug 26 2005 08:33 am Alexander Terekhov wrote: > Joe Seigh wrote: > [...] > >>So what's the point other than a control dependent barrier is slower >>then a plain load/load and is no more functional? > > > It's no slower. The speed and effects of the dumbest implementation of > op(msync::cchlb{_path}) is the same as op(msync::acq). It can be done > better. > You have an api that is way more complicated than it probably needs to be. Sun has #LoadLoad, #LoadStore, etc... which gives you all the different memory ordering that you would need. You seem to have a lot more variations which aren't well defined and with no examples of what situations they would be needed in. What situations wouldn't Sun's membars work in that yours would? Note that load_depends is a special case as it's a sort of poor mans acquire membar on platforms that don't have real ones. But it's not the same as acquire so you have to be a little careful in it's use. -- Joe Seigh When you get lemons, you make lemonade. When you get hardware, you make software. .