mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-19 09:04:51 +08:00
556fb7131e
Having __sysret() as an inline function has the unfortunate effect of
adding casts and large constants comparisons after the syscall returns
that significantly inflate some light code that's otherwise syscall-
heavy. Even nolibc-test grew by ~1%.
Let's switch back to a macro for this, and use it only with signed
arguments. Note that it is also possible to design a slightly more
complex macro covering unsigned and pointers but we only have 3 such
syscalls so it is pointless, and these were just addressed not to use
this macro anymore. Now for the argument (the local variable containing
the syscall return value), any negative value is an error, that results
in -1 being returned and errno to be assigned the opposite value.
This may be revisited again in the future if really needed but for now
let's get back to something sane.
Fixes:
|
||
---|---|---|
.. | ||
.gitignore | ||
arch-aarch64.h | ||
arch-arm.h | ||
arch-i386.h | ||
arch-loongarch.h | ||
arch-mips.h | ||
arch-powerpc.h | ||
arch-riscv.h | ||
arch-s390.h | ||
arch-x86_64.h | ||
arch.h | ||
compiler.h | ||
crt.h | ||
ctype.h | ||
errno.h | ||
Makefile | ||
nolibc.h | ||
signal.h | ||
stackprotector.h | ||
std.h | ||
stdint.h | ||
stdio.h | ||
stdlib.h | ||
string.h | ||
sys.h | ||
time.h | ||
types.h | ||
unistd.h |