David 'Digit' Turner
b57db7581c
libc: Fix recursive mutex lock implementation.
This fixes a bug that was introduced in the latest pthread optimization. It happens when a recursive lock is contented by several threads. The main issue was that the atomic counter increment in _recursive_increment() could be annihilated by a non-conditional write in pthread_mutex_lock() used to update the value's lower bits to indicate contention. This patch re-introduces the use of the global recursive lock in _recursive_increment(). This will hit performance, but a future patch will be provided to remove it from the source code. Change-Id: Ie22069d376cebf2e7d613ba00b6871567f333544
Description
No description provided
Languages
C
68.1%
Assembly
16.2%
C++
13.4%
Makefile
1.1%
Python
0.9%
Other
0.2%