aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/sys_linux_mipsx.s
diff options
context:
space:
mode:
authorWèi Cōngruì <crvv.mail@gmail.com>2018-01-23 15:56:24 +0800
committerIan Lance Taylor <iant@golang.org>2018-04-24 14:10:43 +0000
commitcc8809238b69b8614a1db1ecd1602318a05a259d (patch)
treeed10a9e482b39a6936e89c3b88c04b9f017105bb /src/runtime/sys_linux_mipsx.s
parent665b9b3476ad0a6dc4e578e42e6c63012e23aaa0 (diff)
downloadgo-cc8809238b69b8614a1db1ecd1602318a05a259d.tar.gz
go-cc8809238b69b8614a1db1ecd1602318a05a259d.zip
runtime: fix errno sign for epollctl on mips, mips64 and ppc64
The caller of epollctl expects it to return a negative errno value, but it returns a positive errno value on mips, mips64 and ppc64. The change fixes this. Updates #23446 Change-Id: Ie6372eca6c23de21964caaaa433c9a45ef93531e Reviewed-on: https://go-review.googlesource.com/89235 Reviewed-by: Carlos Eduardo Seo <cseo@linux.vnet.ibm.com> Reviewed-by: Ian Lance Taylor <iant@golang.org> Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
Diffstat (limited to 'src/runtime/sys_linux_mipsx.s')
-rw-r--r--src/runtime/sys_linux_mipsx.s1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/runtime/sys_linux_mipsx.s b/src/runtime/sys_linux_mipsx.s
index 52eccca093..95f6367893 100644
--- a/src/runtime/sys_linux_mipsx.s
+++ b/src/runtime/sys_linux_mipsx.s
@@ -444,6 +444,7 @@ TEXT runtime·epollctl(SB),NOSPLIT,$0-20
MOVW ev+12(FP), R7
MOVW $SYS_epoll_ctl, R2
SYSCALL
+ SUBU R2, R0, R2 // caller expects negative errno
MOVW R2, ret+16(FP)
RET