nptl: Effectively skip CAS in spinlock loop
The commit: "Add LLL_MUTEX_READ_LOCK [BZ #28537]" SHA1: d672a98a introduced LLL_MUTEX_READ_LOCK, to skip CAS in spinlock loop if atomic load fails. But, "continue" inside of do-while loop does not skip the evaluation of escape expression, thus CAS is not skipped. Replace do-while with while and skip LLL_MUTEX_TRYLOCK if LLL_MUTEX_READ_LOCK fails. Reviewed-by:H.J. Lu <hjl.tools@gmail.com> (cherry picked from commit 6b8dbbd0)
Loading
Please register or sign in to comment