diff options
| author | Jason Evans <jasone@canonware.com> | 2016-10-10 22:15:10 -0700 |
|---|---|---|
| committer | Jason Evans <jasone@canonware.com> | 2016-10-10 22:15:10 -0700 |
| commit | 5f11fb7d43795e9e2f5d72c8a43a042baaee9b63 (patch) | |
| tree | 24e3b4aeb23578b483b46f9804d0a6545aac5a8b /include | |
| parent | ee0c74b77a24dc4fdaad2c950bcf621b6fa54095 (diff) | |
| download | platform_external_jemalloc_new-5f11fb7d43795e9e2f5d72c8a43a042baaee9b63.tar.gz platform_external_jemalloc_new-5f11fb7d43795e9e2f5d72c8a43a042baaee9b63.tar.bz2 platform_external_jemalloc_new-5f11fb7d43795e9e2f5d72c8a43a042baaee9b63.zip | |
Do not advance decay epoch when time goes backwards.
Instead, move the epoch backward in time. Additionally, add
nstime_monotonic() and use it in debug builds to assert that time only
goes backward if nstime_update() is using a non-monotonic time source.
Diffstat (limited to 'include')
| -rw-r--r-- | include/jemalloc/internal/nstime.h | 3 | ||||
| -rw-r--r-- | include/jemalloc/internal/private_symbols.txt | 1 |
2 files changed, 4 insertions, 0 deletions
diff --git a/include/jemalloc/internal/nstime.h b/include/jemalloc/internal/nstime.h index c892bac8..93b27dc8 100644 --- a/include/jemalloc/internal/nstime.h +++ b/include/jemalloc/internal/nstime.h @@ -31,9 +31,12 @@ void nstime_imultiply(nstime_t *time, uint64_t multiplier); void nstime_idivide(nstime_t *time, uint64_t divisor); uint64_t nstime_divide(const nstime_t *time, const nstime_t *divisor); #ifdef JEMALLOC_JET +typedef bool (nstime_monotonic_t)(void); +extern nstime_monotonic_t *nstime_monotonic; typedef bool (nstime_update_t)(nstime_t *); extern nstime_update_t *nstime_update; #else +bool nstime_monotonic(void); bool nstime_update(nstime_t *time); #endif diff --git a/include/jemalloc/internal/private_symbols.txt b/include/jemalloc/internal/private_symbols.txt index d633272a..f9d6e9a7 100644 --- a/include/jemalloc/internal/private_symbols.txt +++ b/include/jemalloc/internal/private_symbols.txt @@ -298,6 +298,7 @@ nstime_idivide nstime_imultiply nstime_init nstime_init2 +nstime_monotonic nstime_ns nstime_nsec nstime_sec |
