| // Copyright 2009 The Go Authors. All rights reserved. |
| // Use of this source code is governed by a BSD-style |
| // license that can be found in the LICENSE file. |
| qcount uint // total data in the q |
| dataqsiz uint // size of the circular q |
| elemtype *_type // element type |
| recvx uint // receive index |
| recvq waitq // list of recv waiters |
| sendq waitq // list of send waiters |
| // Buffer follows Hchan immediately in memory. |
| // chanbuf(c, i) is pointer to the i'th slot in the buffer. |
| // #define chanbuf(c, i) ((byte*)((c)->buf)+(uintptr)(c)->elemsize*(i)) |
| // Changes here must also be made in src/cmd/gc/select.c's selecttype. |
| elem unsafe.Pointer // data element |
| so uint16 // vararg of selected bool |
| receivedp *bool // pointer to received bool (recv2) |
| // Changes here must also be made in src/cmd/gc/select.c's selecttype. |
| tcase uint16 // total count of scase[] |
| ncase uint16 // currently filled scase[] |
| pollorder *uint16 // case poll order |
| lockorder **hchan // channel lock order |
| scase [1]scase // one per case (in order of appearance) |