From a9bda22cd698374f61b1705da211d68ead9d98ab Mon Sep 17 00:00:00 2001 From: John Polstra 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/libc_r/uthread/uthread_mutex.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'lib/libc_r') diff --git a/lib/libc_r/uthread/uthread_mutex.c b/lib/libc_r/uthread/uthread_mutex.c index f7662c71c951..ec6c0f6f4e6a 100644 --- a/lib/libc_r/uthread/uthread_mutex.c +++ b/lib/libc_r/uthread/uthread_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.3