aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/resolve.c
diff options
context:
space:
mode:
authorJonathan Wakely <jwakely@redhat.com>2020-11-25 17:59:44 +0000
committerJonathan Wakely <jwakely@redhat.com>2020-11-25 18:24:13 +0000
commitdfc537e554afa98b42a4b203ffd08c0eddba746e (patch)
treed683b7caeea89f9f590ed5f4e6df5b3362b7d956 /gcc/fortran/resolve.c
parent7d2a98a7273c423842a3935de64b15a6d6cb33bc (diff)
downloadgcc-dfc537e554afa98b42a4b203ffd08c0eddba746e.zip
gcc-dfc537e554afa98b42a4b203ffd08c0eddba746e.tar.gz
gcc-dfc537e554afa98b42a4b203ffd08c0eddba746e.tar.bz2
libstdc++: Remove redundant clock conversions in atomic waits
For the case where a timeout is specified using the system_clock we perform a conversion to the preferred clock (which is either steady_clock or system_clock itself), wait using __cond_wait_until_impl, and then check the time by that clock again to see if it was reached. This is entirely redundant, as we can just call __cond_wait_until_impl directly. It will wait using the specified clock, and there's no need to check the time twice. For the no_timeout case this removes two unnecessary calls to the clock's now() function, and for the timeout case it removes three calls. libstdc++-v3/ChangeLog: * include/bits/atomic_timed_wait.h (__cond_wait_until): Do not perform redundant conversions to the same clock.
Diffstat (limited to 'gcc/fortran/resolve.c')
0 files changed, 0 insertions, 0 deletions