diff options
author | Austin Clements <austin@google.com> | 2017-05-23 17:54:24 -0400 |
---|---|---|
committer | Brad Fitzpatrick <bradfitz@golang.org> | 2017-05-23 23:21:19 +0000 |
commit | daf6706f374f7895bbabf812c1ffa08516cadf82 (patch) | |
tree | c2bb72655f5bf58253b1c30f662067b971fc45d7 | |
parent | 958c64bbabfea5888913a5e3fdb371f79f45d2b9 (diff) | |
download | go-daf6706f374f7895bbabf812c1ffa08516cadf82.tar.gz go-daf6706f374f7895bbabf812c1ffa08516cadf82.zip |
[release-branch.go1.8] runtime: use pselect6 for usleep on linux/386
Commit 4dcba023c6 replaced select with pselect6 on linux/amd64 and
linux/arm, but it turns out the Android emulator uses linux/386. This
makes the equivalent change there, too.
Fixes #20409 more.
Change-Id: If542d6ade06309aab8758d5f5f6edec201ca7670
Reviewed-on: https://go-review.googlesource.com/44011
Run-TryBot: Austin Clements <austin@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
(cherry picked from commit ecad34a40ea390ddf5ba2da8f3c3f2c5f15297c8)
Reviewed-on: https://go-review.googlesource.com/44002
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
Reviewed-by: Chris Broadfoot <cbro@golang.org>
-rw-r--r-- | src/runtime/sys_linux_386.s | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/runtime/sys_linux_386.s b/src/runtime/sys_linux_386.s index 45320c068a..ba6f7cc8dd 100644 --- a/src/runtime/sys_linux_386.s +++ b/src/runtime/sys_linux_386.s @@ -98,15 +98,18 @@ TEXT runtimeĀ·usleep(SB),NOSPLIT,$8 MOVL $1000000, CX DIVL CX MOVL AX, 0(SP) + MOVL $1000, AX // usec to nsec + MULL DX MOVL DX, 4(SP) - // select(0, 0, 0, 0, &tv) - MOVL $142, AX + // pselect6(0, 0, 0, 0, &ts, 0) + MOVL $308, AX MOVL $0, BX MOVL $0, CX MOVL $0, DX MOVL $0, SI LEAL 0(SP), DI + MOVL $0, BP INVOKE_SYSCALL RET |