libthr: Always use the threaded rtld lock implementation.
The threaded rtld lock implementation is faster even in the single-threaded case because it postpones signal handlers via THR_CRITICAL_ENTER and THR_CRITICAL_LEAVE instead of calling sigprocmask(2). As a result, exception handling becomes faster in single-threaded applications linked with libthr. Reviewed by: kib
This commit is contained in:
parent
33b61a0b06
commit
b18943f3b4
@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -57,11 +57,6 @@ _thr_setthreaded(int threaded)
|
||||
return (0);
|
||||
|
||||
__isthreaded = threaded;
|
||||
if (threaded != 0) {
|
||||
_thr_rtld_init();
|
||||
} else {
|
||||
_thr_rtld_fini();
|
||||
}
|
||||
return (0);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user