1
0
mirror of https://github.com/golang/go synced 2024-09-30 03:34:51 -06:00
The Go programming language
Go to file
Keith Randall 42257a262c runtime: in semasleep, subtract time spent so far from timeout
When pthread_cond_timedwait_relative_np gets a spurious wakeup
(due to a signal, typically), we used to retry with the same
relative timeout. That's incorrect, we should lower the timeout
by the time we've spent in this function so far.

In the worst case, signals come in and cause spurious wakeups
faster than the timeout, causing semasleep to never time out.

Also fix nacl and netbsd while we're here. They have similar issues.

Fixes #27520

Change-Id: I6601e120e44a4b8ef436eef75a1e7c8cf1d39e39
Reviewed-on: https://go-review.googlesource.com/133655
Run-TryBot: Keith Randall <khr@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2018-09-07 15:43:45 +00:00
.github .github: use HTTPS for Stack Overflow link in SUPPORT.md 2018-06-12 11:08:14 +00:00
api syscall: implement Unix Socket for Windows 2018-08-28 09:26:45 +00:00
doc doc: add GOMIPS64 to source installation docs 2018-09-05 10:04:57 +00:00
lib/time
misc misc/cgo/testplugin: disable DWARF tests on darwin 2018-09-05 11:27:37 +00:00
src runtime: in semasleep, subtract time spent so far from timeout 2018-09-07 15:43:45 +00:00
test cmd/compile: implement non-constant rotates using ROR on arm64 2018-09-07 14:52:02 +00:00
.gitattributes
.gitignore
AUTHORS A+C: add VMware as author, Venil Noronha as contributor 2018-08-31 02:14:24 +00:00
CONTRIBUTING.md
CONTRIBUTORS A+C: add VMware as author, Venil Noronha as contributor 2018-08-31 02:14:24 +00:00
favicon.ico
LICENSE
PATENTS
README.md
robots.txt

The Go Programming Language

Go is an open source programming language that makes it easy to build simple, reliable, and efficient software.

Gopher image Gopher image by Renee French, licensed under Creative Commons 3.0 Attributions license.

Our canonical Git repository is located at https://go.googlesource.com/go. There is a mirror of the repository at https://github.com/golang/go.

Unless otherwise noted, the Go source files are distributed under the BSD-style license found in the LICENSE file.

Download and Install

Binary Distributions

Official binary distributions are available at https://golang.org/dl/.

After downloading a binary release, visit https://golang.org/doc/install or load doc/install.html in your web browser for installation instructions.

Install From Source

If a binary distribution is not available for your combination of operating system and architecture, visit https://golang.org/doc/install/source or load doc/install-source.html in your web browser for source installation instructions.

Contributing

Go is the work of thousands of contributors. We appreciate your help!

To contribute, please read the contribution guidelines: https://golang.org/doc/contribute.html

Note that the Go project uses the issue tracker for bug reports and proposals only. See https://golang.org/wiki/Questions for a list of places to ask questions about the Go language.