]> Cypherpunks repositories - gostls13.git/commit
runtime: change GNU/Linux usleep to use nanosleep
authorIan Lance Taylor <iant@golang.org>
Fri, 20 Apr 2018 22:30:52 +0000 (15:30 -0700)
committerIan Lance Taylor <iant@golang.org>
Tue, 24 Apr 2018 05:01:13 +0000 (05:01 +0000)
commit665b9b3476ad0a6dc4e578e42e6c63012e23aaa0
tree4848606a8cb62e0a46e8f70983a2d32c75836ef3
parenta3c75d9b313cc9f06969125ff28501c081dac3b8
runtime: change GNU/Linux usleep to use nanosleep

Ever since we added sleep to the runtime back in 2008, we've
implemented it on GNU/Linux with the select (or pselect or pselect6)
system call. But the Linux kernel has a nanosleep system call,
which should be a tiny bit more efficient since it doesn't have to
check to see whether there are any file descriptors. So use it.

Change-Id: Icc3430baca46b082a4d33f97c6c47e25fa91cb9a
Reviewed-on: https://go-review.googlesource.com/108538
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
src/runtime/sys_linux_386.s
src/runtime/sys_linux_amd64.s
src/runtime/sys_linux_arm.s
src/runtime/sys_linux_arm64.s
src/runtime/sys_linux_mips64x.s
src/runtime/sys_linux_mipsx.s
src/runtime/sys_linux_ppc64x.s
src/runtime/sys_linux_s390x.s