diff options
author | jdp <jdp@FreeBSD.org> | 2000-11-01 20:19:07 +0000 |
---|---|---|
committer | jdp <jdp@FreeBSD.org> | 2000-11-01 20:19:07 +0000 |
commit | c7a7ecd8c550ba975d68eaf9ad5d7e25434b8684 (patch) | |
tree | 68a062e8b9cb8a69e9b64ff0473b30265af25106 /lib/libc_r | |
parent | c4a9f49ba81d429e0feff56ed0c369ee75bab7b1 (diff) | |
download | FreeBSD-src-c7a7ecd8c550ba975d68eaf9ad5d7e25434b8684.zip FreeBSD-src-c7a7ecd8c550ba975d68eaf9ad5d7e25434b8684.tar.gz |
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.
Diffstat (limited to 'lib/libc_r')
-rw-r--r-- | lib/libc_r/uthread/uthread_mutex.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/libc_r/uthread/uthread_mutex.c b/lib/libc_r/uthread/uthread_mutex.c index f7662c7..ec6c0f6 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; |