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.
This commit is contained in:
jdp 2000-11-01 20:19:07 +00:00
parent c4a9f49ba8
commit c7a7ecd8c5
3 changed files with 9 additions and 0 deletions

View File

@ -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;

View File

@ -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;

View File

@ -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;