Re: mutexes, locks and so on...

2010-11-16 Thread Alan Barrett
Please could somebody on the eat your CAS whether you like it or not side of the fence explain why the following idea would not work: On Sat, 13 Nov 2010, der Mouse wrote: Consider this hypothetical: x86 does #define ATOMIC_OPS_USE_CAS and defines a CAS(); MI code notices this and defines

Re: mutexes, locks and so on...

2010-11-16 Thread Eric Haszlakiewicz
On Tue, Nov 16, 2010 at 09:44:18AM -0800, Matt Thomas wrote: On Nov 16, 2010, at 9:10 AM, Alan Barrett wrote: Please could somebody on the eat your CAS whether you like it or not side of the fence explain why the following idea would not work: On Sat, 13 Nov 2010, der Mouse wrote:

Re: mutexes, locks and so on...

2010-11-16 Thread Johnny Billquist
On 2010-11-16 18:44, Matt Thomas wrote: On Nov 16, 2010, at 9:10 AM, Alan Barrett wrote: Please could somebody on the eat your CAS whether you like it or not side of the fence explain why the following idea would not work: On Sat, 13 Nov 2010, der Mouse wrote: Consider this hypothetical:

Re: mutexes, locks and so on...

2010-11-16 Thread Johnny Billquist
On 2010-11-16 19:32, Eric Haszlakiewicz wrote: On Tue, Nov 16, 2010 at 09:44:18AM -0800, Matt Thomas wrote: On Nov 16, 2010, at 9:10 AM, Alan Barrett wrote: Please could somebody on the eat your CAS whether you like it or not side of the fence explain why the following idea would not work: On

Re: mutexes, locks and so on...

2010-11-16 Thread YAMAMOTO Takashi
hi, On 2010-11-16 19:32, Eric Haszlakiewicz wrote: On Tue, Nov 16, 2010 at 09:44:18AM -0800, Matt Thomas wrote: On Nov 16, 2010, at 9:10 AM, Alan Barrett wrote: Please could somebody on the eat your CAS whether you like it or not side of the fence explain why the following idea would not

re: mutexes, locks and so on...

2010-11-16 Thread matthew green
FWIW, there *are* sparc implementations of the mutex vector functions, but we had to disable them because of lossage we we not able to (yet) track down. they mostly work, so may be useful for at least reading. .mrg.

Re: mutexes, locks and so on...

2010-11-16 Thread Matt Thomas
On Nov 16, 2010, at 7:32 PM, Johnny Billquist wrote: On 2010-11-17 04:25, matthew green wrote: The (my) problem is that rwlocks must use CAS as well, and I'm starting to think that I have to use CAS for the mutex code as well, as I can't seem to get mutexs work reliably without using the

re: mutexes, locks and so on...

2010-11-16 Thread matthew green
- hppa seems to have a mutex implemented without cas. is it broken? FWIW, the sparc implementation is only broken on SMP. .mrg.

Re: mutexes, locks and so on...

2010-11-16 Thread Matt Thomas
On Nov 16, 2010, at 8:04 PM, Johnny Billquist wrote: On 2010-11-17 04:52, Matt Thomas wrote: Not true. Spinlocks must enter through mutex_spin_enter and adaptive mutexes enter through mutex_enter. The corresponding is true for exiting as well. The only reason mutex_vector_{enter,exit} is