From df3a4e104fb63f96f05b29931dd83e272c2b7936 Mon Sep 17 00:00:00 2001 From: Stefan Liebler Date: Mon, 6 Feb 2017 13:44:23 +0100 Subject: Add __glibc_unlikely hint in lll_trylock, lll_cond_trylock. The macros lll_trylock, lll_cond_trylock are extended by an __glibc_unlikely hint. Now the trylock macros are based on the same assumption about a free/busy lock as lll_lock. With the hint gcc emits code in e.g. pthread_mutex_trylock which does not use jumps if the lock is free. Without the hint it had to jump away if the lock is free. Tested on s390x, ppc. ChangeLog: * sysdeps/nptl/lowlevellock.h (lll_trylock, lll_cond_trylock): Add __glibc_unlikely hint. --- ChangeLog | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'ChangeLog') diff --git a/ChangeLog b/ChangeLog index dd0a0b519f..e4885cf260 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2017-02-06 Stefan Liebler + + * sysdeps/nptl/lowlevellock.h (lll_trylock, lll_cond_trylock): + Add __glibc_unlikely hint. + 2017-02-06 Adhemerval Zanella [BZ #16640] -- cgit v1.2.3