[Bordeaux-threads-devel] compare-and-swap
Faré
fahree at gmail.com
Fri Jul 20 20:58:34 UTC 2012
On Fri, Jul 20, 2012 at 10:00 AM, Josh Marchán <sykopomp at sykosomatic.org> wrote:
> 2. CAS support across implementations has a lot of 'but's associated with
> it. The only thing that seems to be supported across the listed
> implementations is svref and struct access. There's also weird behavior on
> some implementations (notably SBCL) when it comes to accessing dynamic
> variables (where it can only access the global binding, not the local
> one). Is this acceptable? Should a patch include compile-time warnings or
> errors when we detect (when possible) that CAS is being used on an
> unsupported place? Should it be left up to users to use it in the right
> case? Should it break for anything other than svref and structslot, which
> are the only ones supported across the board?
>
My API suggestion is to issue
1- an error if you're using the form in a way that is not supported on
the current platform.
2- a warning if you're using the form in a way that is supported on
the current platform but not universally.
The error and warning should use a defined condition, so that they can
be suitably handled.
—♯ƒ • François-René ÐVB Rideau •Reflection&Cybernethics• http://fare.tunes.org
It is a sorry society where honest people need to carry a gun,
but a sorrier society where they need to carry one but can't.
More information about the bordeaux-threads-devel
mailing list