0.8.2.33
authorDaniel Barlow <dan@telent.net>
Sat, 16 Aug 2003 20:38:40 +0000 (20:38 +0000)
committerDaniel Barlow <dan@telent.net>
Sat, 16 Aug 2003 20:38:40 +0000 (20:38 +0000)
commit6b7b0266343826426a3efffa3b8b8d4d552f8f97
treea9a065b6ade7f0f62edeea2d3e9fa35c6e2244e4
parent1476586427d13b59571fa2c2a0d3836496b4c803
0.8.2.33
Implement INTERRUPT-THREAD, which forces another thread to
execute a function supplied by the caller.

In the process, design a mostly entirely new scheme for
calling Lisp code as a result of a handled signal: instead of
calling into Lisp directly, frob the signal context and the
stack to arrange that the Lisp is called after the signal
handler itself has returned.  This is expected to be
applicable to signal handlers generally (and will have portability
benefits), but needs them to be changed around to call it.
Presently it's used only for interrupt-thread (SIGRTMIN)
and control stack exhaustion (one branch of SIGSEGV)

In principle, all you need do to use this in other places is
call return_to_lisp_function in the signal handler, with the
context and the function object that you wish to be called.
For the x86 you also need to make sure the signal is being
handled on the alternate signal stack, otherwise you'll
overwrite your own stack frame.
13 files changed:
contrib/asdf-install/asdf-install.asd
package-data-list.lisp-expr
src/code/debug-int.lisp
src/code/target-thread.lisp
src/runtime/interrupt.c
src/runtime/interrupt.h
src/runtime/linux-os.c
src/runtime/linux-os.h
src/runtime/thread.c
src/runtime/x86-assem.S
src/runtime/x86-linux-os.c
tests/threads.impure.lisp
version.lisp-expr