From owner-svn-src-all@FreeBSD.ORG Wed Sep 1 13:22:55 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B62541065674; Wed, 1 Sep 2010 13:22:55 +0000 (UTC) (envelope-from davidxu@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A51FD8FC14; Wed, 1 Sep 2010 13:22:55 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o81DMtVq065889; Wed, 1 Sep 2010 13:22:55 GMT (envelope-from davidxu@svn.freebsd.org) Received: (from davidxu@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o81DMtSp065887; Wed, 1 Sep 2010 13:22:55 GMT (envelope-from davidxu@svn.freebsd.org) Message-Id: <201009011322.o81DMtSp065887@svn.freebsd.org> From: David Xu Date: Wed, 1 Sep 2010 13:22:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212095 - head/lib/libthr/thread X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Sep 2010 13:22:55 -0000 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