glibc/nptl/sysdeps
Andi Kleen e8c659d74e Add elision to pthread_mutex_{try,timed,un}lock
Add elision paths to the basic mutex locks.

The normal path has a check for RTM and upgrades the lock
to RTM when available. Trylocks cannot automatically upgrade,
so they check for elision every time.

We use a 4 byte value in the mutex to store the lock
elision adaptation state. This is separate from the adaptive
spin state and uses a separate field.

Condition variables currently do not support elision.

Recursive mutexes and condition variables may be supported at some point,
but are not in the current implementation. Also "trylock" will
not automatically enable elision unless some other lock call
has been already called on the lock.

This version does not use IFUNC, so it means every lock has one
additional check for elision. Benchmarking showed the overhead
to be negligible.
2013-07-02 08:46:55 -07:00
..
i386 Reserve new TLS field for x86 and x86_64 2013-05-15 20:20:54 +02:00
powerpc PowerPC: Reserve TCB space for EBB framework 2013-06-17 15:50:53 -05:00
pthread Add new internal mutex type flags for elision. 2013-07-02 08:46:54 -07:00
s390 Update copyright notices with scripts/update-copyrights. 2013-01-02 19:05:09 +00:00
sh Update copyright notices with scripts/update-copyrights. 2013-01-02 19:05:09 +00:00
sparc Update copyright notices with scripts/update-copyrights. 2013-01-02 19:05:09 +00:00
unix/sysv/linux Add elision to pthread_mutex_{try,timed,un}lock 2013-07-02 08:46:55 -07:00
x86_64 Reserve new TLS field for x86 and x86_64 2013-05-15 20:20:54 +02:00