Commit 4d27c4c2 authored by Nikhil Benesch's avatar Nikhil Benesch Committed by Austin Clements
Browse files

runtime: correct error handling in several FreeBSD syscall wrappers

The FreeBSD syscall convention uses the carry flag to indicate whether
an error has occured. The sys_umtx_op, thr_new, and pipe2 syscall
wrappers were failing to account for this convention and silently
suppressing errors as a result. This commit corrects these wrappers
by copying the pattern used by the other fallible syscall wrappers.

Note that futexsleep1 must now explicitly ignore the ETIMEDOUT error
from sys_umtx_op. Previously ETIMEDOUT was implicitly ignored because
sys_umtx_op never returned an error.

Fixes #43106.

Change-Id: I9c422b87cf4c6d308003bf42c3b419f785578b5d
Reviewed-on: https://go-review.googlesource.com/c/go/+/276892


Run-TryBot: Ian Lance Taylor <iant@golang.org>
Reviewed-by: default avatarAustin Clements <austin@google.com>
Trust: Than McIntosh <thanm@google.com>
parent 9b614712
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment