diff --git a/lib/libthr/thread/thr_init.c b/lib/libthr/thread/thr_init.c index c29e8c307fc..937d83f1eb2 100644 --- a/lib/libthr/thread/thr_init.c +++ b/lib/libthr/thread/thr_init.c @@ -363,6 +363,12 @@ _libpthread_init(struct pthread *curthread) _thr_signal_init(); if (_thread_event_mask & TD_CREATE) _thr_report_creation(curthread, curthread); + /* + * Always use our rtld lock implementation. + * It is faster because it postpones signal handlers + * instead of calling sigprocmask(2). + */ + _thr_rtld_init(); } } diff --git a/lib/libthr/thread/thr_kern.c b/lib/libthr/thread/thr_kern.c index 1e7cb510130..b5a8358b9f0 100644 --- a/lib/libthr/thread/thr_kern.c +++ b/lib/libthr/thread/thr_kern.c @@ -57,11 +57,6 @@ _thr_setthreaded(int threaded) return (0); __isthreaded = threaded; - if (threaded != 0) { - _thr_rtld_init(); - } else { - _thr_rtld_fini(); - } return (0); }