diff options
author | Aleksand Malikov <schn27@gmail.com> | 2021-08-23 17:27:48 +0300 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2021-08-23 20:36:10 +0300 |
commit | 1a821390d11d3bc66e6858f27dceeef67e14078d (patch) | |
tree | dfca554c1ed67375f1bf69d89560061faa40379e /newlib | |
parent | bc0e8a996110550f65cd356d7da0ba1b5beb243e (diff) |
fix race condition in List_insert
Revert mx parameter and mutex lock while operating the list.
Mutex was removed with 94d24160 informing that:
'Use InterlockedCompareExchangePointer to ensure race safeness
without using a mutex.'
But it does not.
Calling pthread_mutex_init and pthread_mutex_destroy from two or
more threads occasionally leads to hang in pthread_mutex_destroy.
To not change the behaviour of other cases where List_insert was called,
List_insert_nolock is added.
Diffstat (limited to 'newlib')
0 files changed, 0 insertions, 0 deletions