S390: Use new __libc_tbegin_retry macro in elision-lock.c.
commit53c5c3d5ac238901c13f28a73ba05b0678094e80
authorStefan Liebler <stli@linux.vnet.ibm.com>
Tue, 20 Dec 2016 14:12:48 +0000 (20 15:12 +0100)
committerStefan Liebler <stli@linux.vnet.ibm.com>
Tue, 20 Dec 2016 14:12:48 +0000 (20 15:12 +0100)
treec9419d79ec76ed267d8887cc2ea31c4ffada2610
parent8bfc4a2ab4bebdf86c151665aae8a266e2f18fb4
S390: Use new __libc_tbegin_retry macro in elision-lock.c.

This patch implements __libc_tbegin_retry macro which is equivalent to
gcc builtin __builtin_tbegin_retry, except the changes which were applied
to __libc_tbegin in the previous patch.

If tbegin aborts with _HTM_TBEGIN_TRANSIENT.  Then this macros restores
the fpc, fprs and automatically retries up to retry_cnt tbegins.
Further saving of the state is omitted as it is already saved in the
first round.  Before retrying a further transaction, the
transaction-abort-assist instruction is used to support the cpu.

This macro is now used in function __lll_lock_elision.

ChangeLog:

* sysdeps/unix/sysv/linux/s390/htm.h(__libc_tbegin_retry): New macro.
* sysdeps/unix/sysv/linux/s390/elision-lock.c (__lll_lock_elision):
Use __libc_tbegin_retry macro.
ChangeLog
sysdeps/unix/sysv/linux/s390/elision-lock.c
sysdeps/unix/sysv/linux/s390/htm.h