0.9.2.9: thread objects
* Public interface changes
** proper thread objects instead of thread ids
** (MAKE-THREAD FN &KEY NAME) => THREAD
** (THREAD-NAME THREAD): threads have names (useful for debugging,
logging)
** (THREAD-ALIVE-P THREAD)
** *CURRENT-THREAD* special is bound in each thread
** (LIST-ALL-THREADS) returns a list of all active threads
* Notes
** thread-init moved earlier in cold-init and reinit
** the lisp side does not ever use os_thread_t (it was problematic due
to pthread_t being opaque) but struct thread *
** threads are reaped (i.e. the thread is pthread_joined and struct
thread* is freed) by the thread object's finalizer. This makes
it easy to implement resetting threads. Running threads are kept
in sb-thread::*all-threads*.
** threads block all blockable signals when going down:
interrupt-thread and others cannot catch it at an inappropriate
moment, for instance calling quit outside the catch %end-of-the-world
** target-thread.lisp renamed target-multithread.lisp,
target-thread.lisp now contains the generic thread support
** new file early-thread.lisp: define *current-thread*
** removed thread state STOPPING that was only used for assertions and
complicated matters
** renumbered thread states
** sb-thread::release-spinlock now releases the locks with
non-fixnum value, but is no longer safe to call multiple times
** much simplified locking for threads and gc
** fixed deadlocking bugs introduced by the pthread merge
31 files changed: