This is the mail archive of the 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]

[PATCH] S/390: Port of lock elision to System/z


this is a port of the lock elision implementation of Intel to System/z.
This is the continuation of Dominik Vogts patch
The lock elision code is only built with --enable-lock-elision=yes.
Then default mutexes are elided via __builtin_tbegin, if the cpu
supports transactions. By default lock elision is not enabled and the
elision code is not built (Intel always builds the elision code).
This is necessary in order to compile glibc on S/390 with an gcc
without transactions-support. The requirements on gcc are
checked by configure-script. Binutils are needed in version 2.24,
which is already checked by configure-script.
The patch is tested on S390 / S390x with lock-elision enabled /disabled.

This implementation breaks pthread_mutex_destroy in the same way as described in Bug 16657.



2014-04-24  Stefan Liebler  <>

	* (enable-lock-elision): New Makefile variable.
	* Likewise.
	* configure: Regenerate.
	* sysdeps/s390/
	Add check for gcc transactions support.
	* sysdeps/s390/configure: Regenerate.
	* nptl/sysdeps/unix/sysv/linux/s390/Makefile: New file.
	Build elision files if enabled.
	* nptl/sysdeps/unix/sysv/linux/s390/elision-conf.c: New file.
	Add lock elision support for s390.
	* nptl/sysdeps/unix/sysv/linux/s390/elision-conf.h: Likewise.
	* nptl/sysdeps/unix/sysv/linux/s390/elision-lock.c: Likewise.
	* nptl/sysdeps/unix/sysv/linux/s390/elision-timed.c: Likewise.
	* nptl/sysdeps/unix/sysv/linux/s390/elision-trylock.c: Likewise.
	* nptl/sysdeps/unix/sysv/linux/s390/elision-unlock.c: Likewise.
	* nptl/sysdeps/unix/sysv/linux/s390/force-elision.h: Likewise.
	* nptl/sysdeps/unix/sysv/linux/s390/pthread_mutex_cond_lock.c:
	* nptl/sysdeps/unix/sysv/linux/s390/pthread_mutex_lock.c:
	* nptl/sysdeps/unix/sysv/linux/s390/pthread_mutex_timedlock.c:
	* nptl/sysdeps/unix/sysv/linux/s390/pthread_mutex_trylock.c:
	* nptl/sysdeps/unix/sysv/linux/s390/pthread_mutex_unlock.c:
	* nptl/sysdeps/unix/sysv/linux/s390/lowlevellock.h:
	(__lll_timedlock_elision, __lll_lock_elision)
	(__lll_unlock_elision, __lll_trylock_elision)
	(lll_timedlock_elision, lll_lock_elision)
	(lll_unlock_elision, lll_trylock_elision): Add.
	* nptl/sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h
	(pthread_mutex_t): Add lock elision support for s390.

Attachment: patchglibc_tx_20140424
Description: Text document

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