aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/sys_linux_386.s
diff options
context:
space:
mode:
authorAustin Clements <austin@google.com>2017-05-23 17:54:24 -0400
committerBrad Fitzpatrick <bradfitz@golang.org>2017-05-23 22:47:31 +0000
commite26b51b0d587b6fe17020fa66d400492c95f43de (patch)
treed648b42f9dbcc240397909d3ea94be0b8c16eb50 /src/runtime/sys_linux_386.s
parentdd61aa55e8f4d91fdcc098e64fa26854c860ff0d (diff)
downloadgo-e26b51b0d587b6fe17020fa66d400492c95f43de.tar.xz
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>
Diffstat (limited to 'src/runtime/sys_linux_386.s')
-rw-r--r--src/runtime/sys_linux_386.s7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/runtime/sys_linux_386.s b/src/runtime/sys_linux_386.s
index 2eb4b1e665..60618337dc 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