diff options
author | Giuliano Belinassi <giuliano.belinassi@usp.br> | 2020-08-22 17:43:43 -0300 |
---|---|---|
committer | Giuliano Belinassi <giuliano.belinassi@usp.br> | 2020-08-22 17:43:43 -0300 |
commit | a926878ddbd5a98b272c22171ce58663fc04c3e0 (patch) | |
tree | 86af256e5d9a9c06263c00adc90e5fe348008c43 /libgo/go/runtime/select.go | |
parent | 542730f087133690b47e036dfd43eb0db8a650ce (diff) | |
parent | 07cbaed8ba7d1b6e4ab3a9f44175502a4e1ecdb1 (diff) | |
download | gcc-devel/autopar_devel.zip gcc-devel/autopar_devel.tar.gz gcc-devel/autopar_devel.tar.bz2 |
Merge branch 'autopar_rebase2' into autopar_develdevel/autopar_devel
Quickly commit changes in the rebase branch.
Diffstat (limited to 'libgo/go/runtime/select.go')
-rw-r--r-- | libgo/go/runtime/select.go | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/libgo/go/runtime/select.go b/libgo/go/runtime/select.go index c9e3dd7..cf5d0c7 100644 --- a/libgo/go/runtime/select.go +++ b/libgo/go/runtime/select.go @@ -103,8 +103,9 @@ func block() { // selectgo implements the select statement. // // cas0 points to an array of type [ncases]scase, and order0 points to -// an array of type [2*ncases]uint16. Both reside on the goroutine's -// stack (regardless of any escaping in selectgo). +// an array of type [2*ncases]uint16 where ncases must be <= 65536. +// Both reside on the goroutine's stack (regardless of any escaping in +// selectgo). // // selectgo returns the index of the chosen scase, which matches the // ordinal position of its respective select{recv,send,default} call. @@ -115,6 +116,8 @@ func selectgo(cas0 *scase, order0 *uint16, ncases int) (int, bool) { print("select: cas0=", cas0, "\n") } + // NOTE: In order to maintain a lean stack size, the number of scases + // is capped at 65536. cas1 := (*[1 << 16]scase)(unsafe.Pointer(cas0)) order1 := (*[1 << 17]uint16)(unsafe.Pointer(order0)) |