Major libcaps work to support userland threading. Stage 1/2.
authorMatthew Dillon <dillon@dragonflybsd.org>
Thu, 4 Dec 2003 22:06:22 +0000 (22:06 +0000)
committerMatthew Dillon <dillon@dragonflybsd.org>
Thu, 4 Dec 2003 22:06:22 +0000 (22:06 +0000)
commit5bef0e51d9e2701addcd25c1adbe94d7f5f9eb8b
tree431a834250928cb0cdb38dcea905913cac8874e3
parent093dd88e37216259967ec41eb1ff55a04cfa79c9
Major libcaps work to support userland threading.  Stage 1/2.
Hook the system's upcall mechanism into the globaldata structure
and hook up the LWKT thread switching primitives.  Integrate the
mp_lock code from DragonFly into libcaps to serve as a master lock
for userland threading as well (it turns out that the BGL support in
DragonFly could be trivially ported to the userland threading code).

Still todo: hook up critical section handling, deal with FP regs,
hook up rfork support for multiple virtual cpu's via the upcall mechanism,
and testing of same.

Work by: Galen Sampson <galen_sampson@yahoo.com> and
 Matthew Dillon <dillon@backplane.com>
21 files changed:
lib/libcaps/Makefile
lib/libcaps/asdefs.c [new file with mode: 0644]
lib/libcaps/defs.h
lib/libcaps/globaldata.c
lib/libcaps/globaldata.h
lib/libcaps/i386/Makefile.inc [new file with mode: 0644]
lib/libcaps/i386/asmacros.h [new file with mode: 0644]
lib/libcaps/i386/md_globaldata.c [copied from lib/libcaps/thread.h with 62% similarity]
lib/libcaps/i386/md_globaldata.h [new file with mode: 0644]
lib/libcaps/i386/mplock.S [new file with mode: 0644]
lib/libcaps/i386/sendsys.h [new file with mode: 0644]
lib/libcaps/i386/td_switch.c [copied from lib/libcaps/globaldata.c with 57% similarity]
lib/libcaps/i386/td_switch_asm.S [new file with mode: 0644]
lib/libcaps/i386/upcall.S [new file with mode: 0644]
lib/libcaps/init.c [copied from lib/libcaps/thread.h with 69% similarity]
lib/libcaps/slaballoc.c
lib/libcaps/slaballoc.h
lib/libcaps/sysport.c [new file with mode: 0644]
lib/libcaps/sysport.h [copied from lib/libcaps/thread.h with 69% similarity]
lib/libcaps/thread.h
lib/libcaps/uthread.c [new file with mode: 0644]