Commit Graph

4 Commits

Author SHA1 Message Date
Rich Felker ccc7b4c3a1 remove __SYSCALL_SSLEN arch macro in favor of using public _NSIG
the issue at hand is that many syscalls require as an argument the
kernel-ABI size of sigset_t, intended to allow the kernel to switch to
a larger sigset_t in the future. previously, each arch was defining
this size in syscall_arch.h, which was redundant with the definition
of _NSIG in bits/signal.h. as it's used in some not-quite-portable
application code as well, _NSIG is much more likely to be recognized
and understood immediately by someone reading the code, and it's also
shorter and less cluttered.

note that _NSIG is actually 65/129, not 64/128, but the division takes
care of throwing away the off-by-one part.
2013-03-26 23:07:31 -04:00
Rich Felker 185a977074 ensure pointer decay in inline-asm arg for i386 syscall6
this is actually a rather subtle issue: do arrays decay to pointers
when used as inline asm args? gcc says yes, but currently pcc says no.
hopefully this discrepency in pcc will be fixed, but since the
behavior is not clearly defined anywhere I can find, I'm using an
explicit operation to cause the decay to occur.
2012-10-13 23:46:51 -04:00
Rich Felker 12e9b4faf6 i386 vsyscall support (vdso-provided sysenter/syscall instruction based)
this doubles the performance of the fastest syscalls on the atom I
tested it on; improvement is reportedly much more dramatic on
worst-case cpus. cannot be used for cancellable syscalls.
2012-10-11 22:47:07 -04:00
Rich Felker 208eb584ef syscall organization overhaul
now public syscall.h only exposes __NR_* and SYS_* constants and the
variadic syscall function. no macros or inline functions, no
__syscall_ret or other internal details, no 16-/32-bit legacy syscall
renaming, etc. this logic has all been moved to src/internal/syscall.h
with the arch-specific parts in arch/$(ARCH)/syscall_arch.h, and the
amount of arch-specific stuff has been reduced to a minimum.

changes still need to be reviewed/double-checked. minimal testing on
i386 and mips has already been performed.
2012-09-08 22:43:14 -04:00