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
c4a9f49ba8
commit
c7a7ecd8c5
@ -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