ack/plat/linux/libsys
George Koehler a585ddf578 Fix parameters of signal handlers for linuxppc.
Linux passes the arguments in registers, but our compiler expects
arguments on the stack.  Signal handlers got garbage instead of the
signal number.  Some handlers, like the one in lang/m2/libm2/sigtrp.c,
need the correct signal number.

I write a "bridge" in PowerPC assembly that moves the arguments to the
stack.  I put the bridge in sigaction(), so I provide a signal() that
calls sigaction().  I remove the *.c glob or wildcard from build.lua,
so linuxppc only compiles its own signal.c, not the other signal.c for
linux386 and linux68k.

My bridge uses sigprocmask(), so I also add sigprocmask().  Because
linux386 and linux68k use globs, they also get sigprocmask().  I sync
the header files so all three Linux platforms declare execve(),
sigprocmask(), and unlink(), but not remove(), because we have
remove() in <stdio.h>.

I am using sigaction.s to test some features that we recently added to
our PowerPC assembler.  These are the "hi16[...]" and "lo16[...]"
syntax, and also the extended names like "beq", "cmpwi", "li", "subi".
2017-01-22 00:52:32 -05:00
..
_exit.c Turns out I wasn't building the syscall libraries. Do so. 2016-08-14 11:23:57 +02:00
_hol0.s Use .hol0 as an additional name for hol0; mcg requires it. 2016-11-19 11:09:07 +01:00
close.c Turns out I wasn't building the syscall libraries. Do so. 2016-08-14 11:23:57 +02:00
creat.c Turns out I wasn't building the syscall libraries. Do so. 2016-08-14 11:23:57 +02:00
errno.s Turns out I wasn't building the syscall libraries. Do so. 2016-08-14 11:23:57 +02:00
execve.c Add execve() system call for Linux 2017-01-06 18:33:52 +08:00
getpid.c Turns out I wasn't building the syscall libraries. Do so. 2016-08-14 11:23:57 +02:00
gettimeofday.c Turns out I wasn't building the syscall libraries. Do so. 2016-08-14 11:23:57 +02:00
ioctl.c Implement isatty() for Linux. 2016-09-20 21:28:37 -04:00
isatty.c Implement isatty() for Linux. 2016-09-20 21:28:37 -04:00
kill.c Turns out I wasn't building the syscall libraries. Do so. 2016-08-14 11:23:57 +02:00
libsys.h Turns out I wasn't building the syscall libraries. Do so. 2016-08-14 11:23:57 +02:00
lseek.c Turns out I wasn't building the syscall libraries. Do so. 2016-08-14 11:23:57 +02:00
open.c Turns out I wasn't building the syscall libraries. Do so. 2016-08-14 11:23:57 +02:00
read.c Turns out I wasn't building the syscall libraries. Do so. 2016-08-14 11:23:57 +02:00
sbrk.c Enable tests for linuxppc via qemu-ppc. 2016-11-26 11:56:17 +01:00
signal.c Turns out I wasn't building the syscall libraries. Do so. 2016-08-14 11:23:57 +02:00
sigprocmask.c Fix parameters of signal handlers for linuxppc. 2017-01-22 00:52:32 -05:00
syscalls.h Turns out I wasn't building the syscall libraries. Do so. 2016-08-14 11:23:57 +02:00
unlink.c Add unlink system call. 2016-09-04 19:23:02 +02:00
write.c Turns out I wasn't building the syscall libraries. Do so. 2016-08-14 11:23:57 +02:00