runtime: fix chan alignment on 32 bits

LGTM=dave
R=golang-codereviews, dave
CC=golang-codereviews, khr, rsc
https://golang.org/cl/128700043
This commit is contained in:
Dmitriy Vyukov 2014-08-25 17:19:56 +04:00
parent 20e97677fd
commit 99080c4b6f
1 changed files with 3 additions and 0 deletions

View File

@ -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