From: Joel Sing Date: Thu, 17 Nov 2022 01:51:56 +0000 (+1100) Subject: runtime: change tfork behaviour to unbreak openbsd/mips64 X-Git-Tag: go1.20rc1~149 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=e84ce0802dac6d5a780acc2f54113b55f49f4b07;p=gostls13.git runtime: change tfork behaviour to unbreak openbsd/mips64 Currently, tfork on openbsd/mips64 returns the thread ID on success and a negative error number on error. In CL#447175, newosproc was changed to assume that a non-zero value is an error - return zero on success to match this expectation. Change-Id: I955efad49b149146165eba3d05fe40ba75caa098 Reviewed-on: https://go-review.googlesource.com/c/go/+/451257 Reviewed-by: Ian Lance Taylor Reviewed-by: Joedian Reid TryBot-Result: Gopher Robot Run-TryBot: Joel Sing --- diff --git a/src/runtime/sys_openbsd_mips64.s b/src/runtime/sys_openbsd_mips64.s index cc37e52e16..affd586742 100644 --- a/src/runtime/sys_openbsd_mips64.s +++ b/src/runtime/sys_openbsd_mips64.s @@ -277,7 +277,7 @@ TEXT runtime·tfork(SB),NOSPLIT,$0 // In parent, return. BEQ R2, 3(PC) - MOVW R2, ret+40(FP) + MOVW $0, ret+40(FP) RET // Initialise m, g.