2018-03-18 10:27 GMT-07:00 Jan Mercl <0xj...@gmail.com>:
> On Sun, Mar 18, 2018 at 6:21 PM Devon H. O'Dell <devon.od...@gmail.com>
> wrote:
>
>> * There is no way to force at least 16 byte alignment of data per the
> language spec, so there is no way to implement DCAS (notably missing
> from sync/atomic) on amd64 (cmpxchg16b requires 16 byte alignment of
> its target operand).
>
> https://golang.org/ref/spec#Size_and_alignment_guarantees

I don't think implementing things in terms of complex128 and using
unsafe.Pointer to convert e.g.

type stackForAlignment struct {
    header complex128
}

to

type Stack struct {
    head *node
    gen   uint64
}

is anybody's idea of a good idea. But well received, I guess it is possible.

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to