diff options
| author | Dmitriy Vyukov <dvyukov@google.com> | 2014-08-25 17:19:56 +0400 |
|---|---|---|
| committer | Dmitriy Vyukov <dvyukov@google.com> | 2014-08-25 17:19:56 +0400 |
| commit | 99080c4b6f29aa6ea988747c43475469e761c8a5 (patch) | |
| tree | 1f5edb06779140ddf2410b839612793a6d224fb9 /src/pkg/runtime | |
| parent | 20e97677fd61dbdca128e9628e28327988c39bb4 (diff) | |
| download | go-99080c4b6f29aa6ea988747c43475469e761c8a5.tar.xz | |
runtime: fix chan alignment on 32 bits
LGTM=dave
R=golang-codereviews, dave
CC=golang-codereviews, khr, rsc
https://golang.org/cl/128700043
Diffstat (limited to 'src/pkg/runtime')
| -rw-r--r-- | src/pkg/runtime/chan.h | 3 |
1 files changed, 3 insertions, 0 deletions
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 |
