Skip to content

Commit daf6706

Browse files
aclementsbradfitz
authored andcommitted
[release-branch.go1.8] runtime: use pselect6 for usleep on linux/386
Commit 4dcba02 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 <[email protected]> TryBot-Result: Gobot Gobot <[email protected]> Reviewed-by: Brad Fitzpatrick <[email protected]> Reviewed-by: Ian Lance Taylor <[email protected]> (cherry picked from commit ecad34a40ea390ddf5ba2da8f3c3f2c5f15297c8) Reviewed-on: https://go-review.googlesource.com/44002 Run-TryBot: Brad Fitzpatrick <[email protected]> Reviewed-by: Chris Broadfoot <[email protected]>
1 parent 958c64b commit daf6706

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/runtime/sys_linux_386.s

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,15 +98,18 @@ TEXT runtime·usleep(SB),NOSPLIT,$8
9898
MOVL $1000000, CX
9999
DIVL CX
100100
MOVL AX, 0(SP)
101+
MOVL $1000, AX // usec to nsec
102+
MULL DX
101103
MOVL DX, 4(SP)
102104

103-
// select(0, 0, 0, 0, &tv)
104-
MOVL $142, AX
105+
// pselect6(0, 0, 0, 0, &ts, 0)
106+
MOVL $308, AX
105107
MOVL $0, BX
106108
MOVL $0, CX
107109
MOVL $0, DX
108110
MOVL $0, SI
109111
LEAL 0(SP), DI
112+
MOVL $0, BP
110113
INVOKE_SYSCALL
111114
RET
112115

0 commit comments

Comments
 (0)