mirror of
https://git.FreeBSD.org/src.git
synced 2025-01-25 16:13:17 +00:00
Ensure that threading library is initialized in pthread_mutex_init().
We need at least thr_malloc ready. The situation is possible e.g. in case of libthr being listed in DT_NEEDED before some of its consumers. Reported and tested by: lev Sponsored by: The FreeBSD Foundation MFC after: 1 week
This commit is contained in:
parent
991f23ef20
commit
ec5fed758c
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=368190
@ -384,6 +384,8 @@ __Tthr_mutex_init(pthread_mutex_t * __restrict mutex,
|
||||
struct pthread_mutex *pmtx;
|
||||
int ret;
|
||||
|
||||
_thr_check_init();
|
||||
|
||||
if (mutex_attr != NULL) {
|
||||
ret = mutex_check_attr(*mutex_attr);
|
||||
if (ret != 0)
|
||||
|
Loading…
Reference in New Issue
Block a user