mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-15 10:17:20 +00:00
1175b23f77
Avoid always using an O(n^2) loop over known syscall structures with strcmp() on each system call. Instead, use a per-ABI cache indexed by the system call number. The first 1024 system calls (which should cover all of the normal system calls in currently-supported ABIs) use a flat array indexed by the system call number to find system call structure. For other system calls, a linked list of structures storing an integer to structure mapping is stored in the ABI. The linked list isn't very smart, but it should only be used by buggy applications invoking unknown system calls. This also fixes handling of unknown system calls which currently trigger a NULL pointer dereference. Reviewed by: kib MFC after: 2 weeks |
||
---|---|---|
.. | ||
aarch64-cloudabi64.c | ||
aarch64-freebsd.c | ||
amd64-cloudabi64.c | ||
amd64-freebsd32.c | ||
amd64-freebsd.c | ||
amd64-linux32.c | ||
amd64-linux.c | ||
arm-freebsd.c | ||
extern.h | ||
i386-freebsd.c | ||
i386-linux.c | ||
main.c | ||
Makefile | ||
Makefile.depend | ||
mips-freebsd.c | ||
powerpc64-freebsd32.c | ||
powerpc64-freebsd.c | ||
powerpc-freebsd.c | ||
setup.c | ||
sparc64-freebsd.c | ||
syscall.h | ||
syscalls.c | ||
truss.1 | ||
truss.h |