Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
atomicity guarantees for threaded code
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2004-10-30 (02:07)
From: David Brown <caml-list@d...>
Subject: Re: [Caml-list] atomicity guarantees for threaded code
On Sat, Oct 30, 2004 at 11:07:28AM +1000, skaller wrote:

> > But, a reference in ocaml will always be in a block, which will always be
> > aligned. 
> On what boundary?

> >  Even x86 will be atomic with a 32-bit transfer that is aligned.
> But perhaps not a 64 bit one.

I would argue that on a machine with 64-bit addresses, you can assume that
64-bit, aligned loads and stores will be atomic.  There is just too much
code that wouldn't work.  Other assumptions are hard to make, though.