freebsd-skq/lib/libc_r/uthread/Makefile.inc
Jason Evans 0a3fa43c7e Implement continuations to correctly handle [sig|_]longjmp() inside of a
signal handler.  Explicitly check for jumps to anywhere other than the
current stack, since such jumps are undefined according to POSIX.

While we're at it, convert thread cancellation to use continuations, since
it's cleaner than the original cancellation code.

Avoid delivering a signal to a thread twice.  This was a pre-existing bug,
but was likely unexposed until these other changes were made.

Defer signals generated by pthread_kill() so that they can be delivered on
the appropriate stack.  deischen claims that this is unnecessary, which is
likely true, but without this change, pthread_kill() can cause undefined
priority queue states and/or PANICs in [sig|_]longjmp(), so I'm leaving
this in for now.  To compile this code out and exercise the bug, define
the _NO_UNDISPATCH cpp macro.  Defining _PTHREADS_INVARIANTS as well will
cause earlier crashes.

PR:			kern/14685
Collaboration with:	deischen
2000-01-19 07:04:50 +00:00

119 lines
2.5 KiB
Makefile

# $FreeBSD$
# uthread sources
.PATH: ${.CURDIR}/uthread
SRCS+= \
uthread_accept.c \
uthread_attr_destroy.c \
uthread_attr_init.c \
uthread_attr_getdetachstate.c \
uthread_attr_getinheritsched.c \
uthread_attr_getschedparam.c \
uthread_attr_getschedpolicy.c \
uthread_attr_getscope.c \
uthread_attr_getstackaddr.c \
uthread_attr_getstacksize.c \
uthread_attr_setcreatesuspend_np.c \
uthread_attr_setdetachstate.c \
uthread_attr_setinheritsched.c \
uthread_attr_setschedparam.c \
uthread_attr_setschedpolicy.c \
uthread_attr_setscope.c \
uthread_attr_setstackaddr.c \
uthread_attr_setstacksize.c \
uthread_autoinit.cc \
uthread_bind.c \
uthread_cancel.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_fchflags.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_getschedparam.c \
uthread_getsockname.c \
uthread_getsockopt.c \
uthread_info.c \
uthread_init.c \
uthread_ioctl.c \
uthread_jmp.c \
uthread_join.c \
uthread_kern.c \
uthread_kill.c \
uthread_listen.c \
uthread_mattr_init.c \
uthread_mattr_kind_np.c \
uthread_msync.c \
uthread_multi_np.c \
uthread_mutex.c \
uthread_mutex_prioceiling.c \
uthread_mutex_protocol.c \
uthread_mutexattr_destroy.c \
uthread_nanosleep.c \
uthread_once.c \
uthread_open.c \
uthread_pipe.c \
uthread_poll.c \
uthread_priority_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_setschedparam.c \
uthread_setsockopt.c \
uthread_shutdown.c \
uthread_sig.c \
uthread_sigaction.c \
uthread_sigblock.c \
uthread_sigmask.c \
uthread_sigpending.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_switch_np.c \
uthread_vfork.c \
uthread_wait4.c \
uthread_write.c \
uthread_writev.c \
uthread_yield.c