Date: Wed, 1 Sep 2010 13:22:55 +0000 (UTC) From: David Xu <davidxu@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r212095 - head/lib/libthr/thread Message-ID: <201009011322.o81DMtSp065887@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: davidxu Date: Wed Sep 1 13:22:55 2010 New Revision: 212095 URL: http://svn.freebsd.org/changeset/base/212095 Log: Remove incorrect comments, also make sure signal is disabled when unregistering sigaction. Modified: head/lib/libthr/thread/thr_sig.c Modified: head/lib/libthr/thread/thr_sig.c ============================================================================== --- head/lib/libthr/thread/thr_sig.c Wed Sep 1 12:08:54 2010 (r212094) +++ head/lib/libthr/thread/thr_sig.c Wed Sep 1 13:22:55 2010 (r212095) @@ -415,19 +415,17 @@ _thr_signal_init(void) __sys_sigprocmask(SIG_UNBLOCK, &act.sa_mask, NULL); } -/* - * called from rtld with rtld_lock locked, because rtld_lock is - * a critical region, so all signals have already beeen masked. - */ void _thr_sigact_unload(struct dl_phdr_info *phdr_info) { + struct pthread *curthread = _get_curthread(); struct urwlock *rwlp; struct sigaction *actp; struct sigaction kact; void (*handler)(int); int sig; + _thr_signal_block(curthread); for (sig = 1; sig < _SIG_MAXSIG; sig++) { actp = &_thr_sigact[sig].sigact; retry: @@ -447,9 +445,10 @@ retry: kact.sa_handler != SIG_DFL && kact.sa_handler != SIG_IGN) __sys_sigaction(sig, actp, NULL); - _thr_rwl_unlock(rwlp); + _thr_rwl_unlock(rwlp); } } + _thr_signal_unblock(curthread); } void
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201009011322.o81DMtSp065887>