Implement getcontext(), setcontext(), makecontext(), and swapcontext().
commitd946df43e4ae8a7a4d5a4ad211a7e2a7adfb5fae
authordillon <dillon>
Tue, 16 Jan 2007 07:16:23 +0000 (16 07:16 +0000)
committerdillon <dillon>
Tue, 16 Jan 2007 07:16:23 +0000 (16 07:16 +0000)
treebc5bc4dc43486daaa21b8e9b0a7cdc8dec3bb268
parent92d5438c61e2543d290753cd6c2068e899c4bb3a
Implement getcontext(), setcontext(), makecontext(), and swapcontext().

This is a preliminary libc-only implementation.  sigprocmask() is used
to mask signals during the context switch and to save and restore signals.
FP registers are not currently saved or restored - that is, synchronous
use is intended.

Submitted-by: "Matt Emmerton" <matt@gsicomp.on.ca>
Finished-up-by: "Matthew Dillon" <dillon@backplane.com>
15 files changed:
lib/libc/Makefile
lib/libc/gen/Makefile.inc
lib/libc/gen/getcontext.3 [copied from lib/libc/gen/ucontext.3 with 54% similarity]
lib/libc/gen/makecontext.3 [copied from lib/libc/gen/ucontext.3 with 57% similarity]
lib/libc/gen/ucontext.3
lib/libc/gen/ucontext.c [new file with mode: 0644]
lib/libc/i386/gen/Makefile.inc
lib/libc/i386/gen/_ctx_start.S [new file with mode: 0644]
lib/libc/i386/gen/makecontext.c [new file with mode: 0644]
lib/libc/i386/gen/mcontext.S [new file with mode: 0644]
lib/libc/i386/sys/Makefile.inc
lib/libc/i386/sys/genasmcontext.c [new file with mode: 0644]
lib/libc/i386/sys/getcontext.S [new file with mode: 0644]
sys/platform/pc32/i386/machdep.c
sys/sys/ucontext.h