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:
parent
5231fb2059
commit
a9bda22cd6
@ -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;
|
||||
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user