freebsd-dev/lib/libpthread
John Birrell dc3a8b52c0 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
..
arch Change to a code sequence which is more likely to work on SMP systems. 1998-09-16 09:27:05 +00:00
man Implement pthread read/write locks as defined by Version 2 of the Single 1998-09-07 19:01:43 +00:00
sys Change the name of this source file so that libc_r builds it instead 1998-04-30 09:04:10 +00:00
test Add support for building test programs. 1998-08-25 12:33:22 +00:00
thread Move the cleanup code that frees memory allocated for a dead thread from 1998-09-30 06:36:56 +00:00
Makefile Don't compile in the use of poll() when building libc_r. This isn't 1998-06-14 11:25:46 +00:00