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:
John Polstra 2000-11-01 20:19:07 +00:00
parent 5231fb2059
commit a9bda22cd6
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;