summaryrefslogtreecommitdiffstats
path: root/lib/libthr/thread
diff options
context:
space:
mode:
authordavidxu <davidxu@FreeBSD.org>2010-09-01 13:22:55 +0000
committerdavidxu <davidxu@FreeBSD.org>2010-09-01 13:22:55 +0000
commitf21ffb282df7bc55b737d9a09197457c20b58bf4 (patch)
treee780e2684472eae7dfb5b6244dc4ea52e52702a3 /lib/libthr/thread
parent58e091d363426ab4b3b8db6a0b2b63be2baaa9b3 (diff)
downloadFreeBSD-src-f21ffb282df7bc55b737d9a09197457c20b58bf4.zip
FreeBSD-src-f21ffb282df7bc55b737d9a09197457c20b58bf4.tar.gz
Remove incorrect comments, also make sure signal is
disabled when unregistering sigaction.
Diffstat (limited to 'lib/libthr/thread')
-rw-r--r--lib/libthr/thread/thr_sig.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/lib/libthr/thread/thr_sig.c b/lib/libthr/thread/thr_sig.c
index 382ff4f..b6755f9 100644
--- a/lib/libthr/thread/thr_sig.c
+++ b/lib/libthr/thread/thr_sig.c
@@ -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
OpenPOWER on IntegriCloud