Skip to content
Snippets Groups Projects
Commit a3310c03 authored by Richard Henderson's avatar Richard Henderson
Browse files

linux-user: Move syscall error detection into safe_syscall_base


The current api from safe_syscall_base() is to return -errno, which is
the interface provided by *some* linux kernel abis.  The wrapper macro,
safe_syscall(), detects error, stores into errno, and returns -1, to
match the api of the system syscall().

For those kernel abis that do not return -errno natively, this leads
to double syscall error detection.  E.g. Linux ppc64, which sets the
SO flag for error.

Simplify the usage from C by moving the error detection into assembly,
and usage from assembly by providing a C helper with which to set errno.

Reviewed-by: default avatarWarner Losh <imp@bsdimp.com>
Signed-off-by: default avatarRichard Henderson <richard.henderson@linaro.org>
parent b9d2af3c
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment