[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
| Date: | -- (:) |
| From: | David Brown <caml-list@d...> |
| Subject: | Re: [Caml-list] atomicity guarantees for threaded code |
On Sat, Oct 30, 2004 at 09:54:37AM +1000, skaller wrote: > > As long as the reference write is atomic, which it is going to be, I would > > suspect this is safe. It probably would even be safe if multiple threads > > updated the reference, but you might just drop entries. > > It isn't clear though. On x86 you can have 1 byte alignment > for an address. What happens if: But, a reference in ocaml will always be in a block, which will always be aligned. Even x86 will be atomic with a 32-bit transfer that is aligned. Dave