Skip to content
Commit 8b9ad5ec authored by Jangwoong Kim's avatar Jangwoong Kim Committed by Sunil K Pandey
Browse files

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: default avatarH.J. Lu <hjl.tools@gmail.com>
(cherry picked from commit 6b8dbbd0)
parent 60b82953
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment