Commit graph

8 commits

Author SHA1 Message Date
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
Xin Wang 24d26b2826 Add execve() system call for Linux 2017-01-06 18:33:52 +08:00
David Given 36ab90385f Change sbrk() to take an int rather than an intptr_t (following the OpenBSD way
rather than the Linux way; various non-C bits of the ACK assume it takes an
int, so it's cleaner).
2016-11-23 22:06:24 +01:00
David Given b549980af2 Wasn't exporting the plat headers; refactor to make this a little cleaner. 2016-08-14 11:01:36 +02:00
dtrg 7292b538bc Added support for remove() and unlink(). 2010-09-27 20:44:49 +00:00
dtrg 085f346f8c Fixed definitions of O_* flags. 2010-08-20 19:27:09 +00:00
dtrg 740940c9fc Fixed major typos in the signal declarations that was preventing anything that used signal() from compiling. 2007-04-24 19:34:34 +00:00
dtrg b500b1a7b7 Added linux386 platform. 2007-04-21 23:02:11 +00:00