Difference between elision-lock.c and -trylock.c
Dominik Vogt
vogt@linux.vnet.ibm.com
Mon Jul 22 09:50:00 GMT 2013
Why does elision-trylock.c _not_ have this code from
elision-lock.c?
if ((status & _XABORT_EXPLICIT)
&& _XABORT_CODE (status) == _ABORT_LOCK_BUSY)
{
/* Right now we skip here. Better would be to wait a bit
and retry. This likely needs some spinning. */
if (*adapt_count != aconf.skip_lock_busy)
*adapt_count = aconf.skip_lock_busy;
}
I cannot think of a reason for that; if a lock is elided via
trylock() and the transaction aborts, shouldn't the adapt_count be
updated just the same as if the lock had been elided with lock()?
Currently the abort code set with
_xabort (_ABORT_LOCK_BUSY);
is completely ignored.
Ciao
Dominik ^_^ ^_^
--
Dominik Vogt
IBM Germany
More information about the Libc-alpha
mailing list