[Mono-devel-list] more ppc atomic.h cleanups

Eyal Alaluf eyala at mainsoft.com
Thu Apr 14 03:21:26 EDT 2005


Hi, all.

Shouldn't the interlocked API's implementation use sync & isync for the memory
barriers?
At least in C++, we have seen many cases where people implemented their own
mutexes using interlocked APIs. Now on multiple CPU system and PPC in
particular a mutex needs to flush the memory barriers so two diferent threads
sharing the same data will be synchronized if they use the mutex properly.

Eyal.

On Wed, 13 Apr 2005, David Waite wrote:

> Date: Wed, 13 Apr 2005 12:31:50 -0600
> From: David Waite <dwaite at gmail.com>
> To: Mono Development List <mono-devel-list at lists.ximian.com>
> Subject: [Mono-devel-list] more ppc atomic.h cleanups
>
> Attached is a patch that performs cleanups of atomic.h for the ppc architecture:
>
> * InterlockedIncrement, InterlockedDecrement: use one fewer register,
> avoid initialization and remove extra addition/subtraction at the end
> * InterlockedExchange: remove tmp initialization, rename tmp to result
> to be consistant with other methods
>
> -David Waite
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: atomic-ppc-cleanups.diff
Type: application/octet-stream
Size: 1730 bytes
Desc: 
Url : http://lists.ximian.com/pipermail/mono-devel-list/attachments/20050414/7cb6ab75/attachment.obj 


More information about the Mono-devel-list mailing list