aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKonstantin Belousov <kib@FreeBSD.org>2020-12-07 01:09:45 +0000
committerKonstantin Belousov <kib@FreeBSD.org>2020-12-07 01:09:45 +0000
commita8835225c38421ab1002f15fbffc648a468d230b (patch)
tree6cbb0db3b6359cb3581ea699bac8ef20503a3506
parente232e33f1f7de48d5332769ef24e9982f737b60c (diff)
downloadsrc-a8835225c38421ab1002f15fbffc648a468d230b.tar.gz
src-a8835225c38421ab1002f15fbffc648a468d230b.zip
MFC r368190:
Ensure that threading library is initialized in pthread_mutex_init().
Notes
Notes: svn path=/stable/11/; revision=368403
-rw-r--r--lib/libthr/thread/thr_mutex.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/libthr/thread/thr_mutex.c b/lib/libthr/thread/thr_mutex.c
index 393e63e674b7..44f4d497b8e6 100644
--- a/lib/libthr/thread/thr_mutex.c
+++ b/lib/libthr/thread/thr_mutex.c
@@ -380,6 +380,8 @@ __pthread_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)