freebsd-dev/lib/libc_r/uthread/Makefile.inc
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

100 lines
2.1 KiB
Makefile

# $Id: Makefile.inc,v 1.15 1998/09/12 22:03:20 dt Exp $
# uthread sources
.PATH: ${.CURDIR}/uthread
SRCS+= \
uthread_accept.c \
uthread_attr_destroy.c \
uthread_attr_init.c \
uthread_attr_getdetachstate.c \
uthread_attr_getstackaddr.c \
uthread_attr_getstacksize.c \
uthread_attr_setcreatesuspend_np.c \
uthread_attr_setdetachstate.c \
uthread_attr_setstackaddr.c \
uthread_attr_setstacksize.c \
uthread_autoinit.cc \
uthread_bind.c \
uthread_clean.c \
uthread_close.c \
uthread_cond.c \
uthread_condattr_destroy.c \
uthread_condattr_init.c \
uthread_connect.c \
uthread_create.c \
uthread_detach.c \
uthread_dup.c \
uthread_dup2.c \
uthread_equal.c \
uthread_execve.c \
uthread_exit.c \
uthread_fchmod.c \
uthread_fchown.c \
uthread_fcntl.c \
uthread_fd.c \
uthread_file.c \
uthread_find_thread.c \
uthread_flock.c \
uthread_fork.c \
uthread_fstat.c \
uthread_fstatfs.c \
uthread_fsync.c \
uthread_gc.c \
uthread_getdirentries.c \
uthread_getpeername.c \
uthread_getprio.c \
uthread_getsockname.c \
uthread_getsockopt.c \
uthread_info.c \
uthread_init.c \
uthread_ioctl.c \
uthread_join.c \
uthread_kern.c \
uthread_kill.c \
uthread_listen.c \
uthread_mattr_init.c \
uthread_mattr_kind_np.c \
uthread_multi_np.c \
uthread_mutex.c \
uthread_mutexattr_destroy.c \
uthread_nanosleep.c \
uthread_once.c \
uthread_open.c \
uthread_pipe.c \
uthread_queue.c \
uthread_read.c \
uthread_readv.c \
uthread_recvfrom.c \
uthread_recvmsg.c \
uthread_resume_np.c \
uthread_rwlock.c \
uthread_rwlockattr.c \
uthread_select.c \
uthread_self.c \
uthread_sendmsg.c \
uthread_sendto.c \
uthread_seterrno.c \
uthread_setprio.c \
uthread_setsockopt.c \
uthread_shutdown.c \
uthread_sig.c \
uthread_sigaction.c \
uthread_sigblock.c \
uthread_sigmask.c \
uthread_sigprocmask.c \
uthread_sigsetmask.c \
uthread_sigsuspend.c \
uthread_sigwait.c \
uthread_single_np.c \
uthread_socket.c \
uthread_socketpair.c \
uthread_spec.c \
uthread_spinlock.c \
uthread_suspend_np.c \
uthread_vfork.c \
uthread_wait4.c \
uthread_write.c \
uthread_writev.c \
uthread_yield.c