const (
maxAlign = 8
- hchanSize = unsafe.Sizeof(hchan{})
+ hchanSize = unsafe.Sizeof(hchan{}) + uintptr(-int(unsafe.Sizeof(hchan{}))&(maxAlign-1))
debugChan = false
)
-// TODO: make hchan.buf an unsafe.Pointer, not a *uint8
+// TODO(khr): make hchan.buf an unsafe.Pointer, not a *uint8
func makechan(t *chantype, size int64) *hchan {
elem := t.elem
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