This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Difference between elision-lock.c and -trylock.c


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]