jb df42f1ac5f Move the cleanup code that frees memory allocated for a dead thread from
the thread kernel into a garbage collector thread which is started when
the fisrt thread is created (other than the initial thread). This
removes the window of opportunity where a context switch will cause a
thread that has locked the malloc spinlock, to enter the thread kernel,
find there is a dead thread and try to free memory, therefore trying
to lock the malloc spinlock against itself.

The garbage collector thread acts just like any other thread, so
instead of having a spinlock to control accesses to the dead thread
list, it uses a mutex and a condition variable so that it can happily
wait to be signalled when a thread exists.
1998-09-30 06:36:56 +00:00
..
1998-09-30 06:22:07 +00:00
1997-02-05 23:26:09 +00:00
1997-02-05 23:26:09 +00:00
1996-01-22 00:23:58 +00:00
1998-09-07 21:55:01 +00:00
1998-09-07 21:55:01 +00:00
1998-09-07 21:55:01 +00:00
1996-01-22 00:23:58 +00:00
1996-01-22 00:23:58 +00:00
1998-09-07 19:23:55 +00:00
1996-01-22 00:23:58 +00:00
1998-09-07 21:55:01 +00:00