From: Dmitriy Vyukov Date: Mon, 25 Aug 2014 13:19:56 +0000 (+0400) Subject: runtime: fix chan alignment on 32 bits X-Git-Tag: go1.4beta1~716 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=99080c4b6f29aa6ea988747c43475469e761c8a5;p=gostls13.git runtime: fix chan alignment on 32 bits LGTM=dave R=golang-codereviews, dave CC=golang-codereviews, khr, rsc https://golang.org/cl/128700043 --- diff --git a/src/pkg/runtime/chan.h b/src/pkg/runtime/chan.h index 52eb20099d..30825eafad 100644 --- a/src/pkg/runtime/chan.h +++ b/src/pkg/runtime/chan.h @@ -21,6 +21,9 @@ struct Hchan byte* buf; uint16 elemsize; uint32 closed; +#ifndef GOARCH_amd64 + uint32 pad; // ensures proper alignment of the buffer that follows Hchan in memory +#endif Type* elemtype; // element type uintgo sendx; // send index uintgo recvx; // receive index