1
0
mirror of https://github.com/systemd/systemd.git synced 2025-01-17 06:04:07 +03:00
Lennart Poettering c54be90b28 timer: make sure we use the right monotonic timestamp
This reworks timer_enter_waiting() in a couple of ways in order to clean
it up a bit and fix #5629.

Most importantly, we previously we initialized ts_monotonic to either
the current time in CLOCK_MONOTONIC or in CLOCK_BOOTTIME, depending on
t->wake_system. Then given specific conditions we'd use this time as
base for our timers. And afterwards, if t->wake_system was on we'd
convetr the resulting value from CLOCK_MONOTONIC to CLOCK_BOOTTIME again
— which of course is wrong since we already were in CLOCK_BOOTTIME! This
fixes this logic, by using a triple timestamp so that we always have the
right base around, and initially only calculate in CLOCK_MONOTONIC and
only convert as last step.

Conversion between the clocks is now done with the generic
usec_shift_clock(), and additions via usec_add() making these
calculations a bit safer.

Fixes: #5629
2017-06-22 21:04:20 +02:00
2017-06-06 11:52:25 -04:00
2017-05-07 20:16:47 -04:00
2015-08-31 18:12:37 +02:00
2015-06-03 00:22:53 +02:00
2014-06-04 15:41:10 -04:00
2017-05-05 21:19:04 -04:00
2016-10-06 11:53:58 -04:00
2017-04-24 18:48:10 +02:00

systemd - System and Service Manager

Count of open issues over time Count of open pull requests over time Build Status
Coverity Scan Status

Details

General information about systemd can be found in the systemd Wiki.

Information about build requirements are provided in the README file.

Consult our NEWS file for information about what's new in the most recent systemd versions.

Please see the HACKING file for information how to hack on systemd and test your modifications.

Please see our Contribution Guidelines for more information about filing GitHub Issues and posting GitHub Pull Requests.

When preparing patches for systemd, please follow our Coding Style Guidelines.

If you are looking for support, please contact our mailing list or join our IRC channel.

Description
The systemd System and Service Manager
Readme 559 MiB
Languages
C 89.2%
Python 5.3%
Shell 4.1%
Meson 1.2%