Skip to content

Commit

Permalink
runtime: change tfork behaviour to unbreak openbsd/mips64
Browse files Browse the repository at this point in the history
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 <[email protected]>
Reviewed-by: Joedian Reid <[email protected]>
TryBot-Result: Gopher Robot <[email protected]>
Run-TryBot: Joel Sing <[email protected]>
  • Loading branch information
4a6f656c committed Nov 19, 2022
1 parent f4f8397 commit e84ce08
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/runtime/sys_openbsd_mips64.s
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit e84ce08

Please sign in to comment.