Use safepoints for INTERRUPT-THREAD
* In INTERRUPT-THREAD, stop threads using safepoints instead of
signals.
* Currently not used by default. Users need to set feature
SB-THRUPTION to enable this code. SB-THRUPTION should only be set
when SB-SAFEPOINT is also enabled.
* This feature should ultimately be rolled into SB-SAFEPOINT, but
remains as a separate build option until both versions are equally
well-tested, and until other avoidable uses of signals have also
been replaced by safepoints.
* On the term "thruption": Earlier work on this feature sometimes
used "interrupt" to refer to INTERRUPT-THREAD, causing confusion
with the traditional meaning of "interrupt" as POSIX signal or WIN32
exception. To avoid such confusion, the runtime now refers to
INTERRUPT-THREAD as a "thruption", short for th(read) (inter)ruption.
* SIGPIPE is not used for threads running Lisp code, but a low-level
handler for SIGPIPE still exists which arranges for threads running
FFI code (in particular, threads blocked in poll, select,
futex_wait) to be interrupted.
* OS support: Minor changes to signal handling required, currently
implemented for Linux and Solaris.
Credits: This is a POSIX backport of Windows threading changes by
Anton Kovalenko and Dmitry Kalyanov.
16 files changed: