Implement getcontext(), setcontext(), makecontext(), and swapcontext().
authorMatthew Dillon <dillon@dragonflybsd.org>
Tue, 16 Jan 2007 07:16:23 +0000 (07:16 +0000)
committerMatthew Dillon <dillon@dragonflybsd.org>
Tue, 16 Jan 2007 07:16:23 +0000 (07:16 +0000)
commite274265043a09fe420ae2182ba74ee43fcfbcbd5
treecebafd4db5e81596c3498b7b56fca195ef8eace9
parent337371ef1b67d2cd2dababb6bb5d5e203e697e9f
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