]> Cypherpunks repositories - gostls13.git/commit
misc/cgo/testcarchive, misc/cgo/testcshared: sleep instead of sched_yield
authorIan Lance Taylor <iant@golang.org>
Tue, 15 Nov 2016 00:50:15 +0000 (16:50 -0800)
committerIan Lance Taylor <iant@golang.org>
Tue, 15 Nov 2016 05:35:54 +0000 (05:35 +0000)
commitb687d6a7886fe7ffea0e36072c2a882c8c485838
tree77ae860bc554c3e85701ea7386c6335f686f105e
parent1e917312511f6ce54bbdcea8cd0c25e66973d49e
misc/cgo/testcarchive, misc/cgo/testcshared: sleep instead of sched_yield

Apparently when GOMAXPROCS == 1 a simple sched_yield in a tight loop is
not necessarily sufficient to permit a signal handler to run. Instead,
sleep for 1/1000 of a second.

Fixes #16649.

Change-Id: I83910144228556e742b7a92a441732ef61aa49d9
Reviewed-on: https://go-review.googlesource.com/33239
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
misc/cgo/testcarchive/main2.c
misc/cgo/testcarchive/main3.c
misc/cgo/testcarchive/main4.c
misc/cgo/testcshared/main4.c
misc/cgo/testcshared/main5.c