From c7a7ecd8c550ba975d68eaf9ad5d7e25434b8684 Mon Sep 17 00:00:00 2001 From: jdp Date: Wed, 1 Nov 2000 20:19:07 +0000 Subject: At the beginning of pthread_mutex_lock(), call _thread_init() if necessary. This works around a bug in old versions of libgcc_r.a which are statically linked into old executables. --- lib/libkse/thread/thr_mutex.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'lib/libkse/thread/thr_mutex.c') diff --git a/lib/libkse/thread/thr_mutex.c b/lib/libkse/thread/thr_mutex.c index f7662c7..ec6c0f6 100644 --- a/lib/libkse/thread/thr_mutex.c +++ b/lib/libkse/thread/thr_mutex.c @@ -402,6 +402,9 @@ pthread_mutex_lock(pthread_mutex_t * mutex) { int ret = 0; + if (_thread_initial == NULL) + _thread_init(); + if (mutex == NULL) ret = EINVAL; -- cgit v1.1