diff options
author | kib <kib@FreeBSD.org> | 2016-08-27 10:56:04 +0000 |
---|---|---|
committer | kib <kib@FreeBSD.org> | 2016-08-27 10:56:04 +0000 |
commit | d8372db7e029f8d978f325bae061cd638b26faaf (patch) | |
tree | c4c84b62aa69a44bd9082e4c165fdbdb9fd6bf94 /sys/kern/kern_timeout.c | |
parent | 7767fddf9fce411b32f1cc6cc3b725dc57dead47 (diff) | |
download | FreeBSD-src-d8372db7e029f8d978f325bae061cd638b26faaf.zip FreeBSD-src-d8372db7e029f8d978f325bae061cd638b26faaf.tar.gz |
MFC r264388 (by davide):
Define SBT_MAX.
MFC r267896 (by davide):
Improve r264388.
MFC note. The SBT_MAX definition already existed on stable/10, but without
the refinement from r267896. Also, consumers of SBT_MAX were not converted,
since r264388 was not merged properly.
Reviewed by: mav
Diffstat (limited to 'sys/kern/kern_timeout.c')
-rw-r--r-- | sys/kern/kern_timeout.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/sys/kern/kern_timeout.c b/sys/kern/kern_timeout.c index 9aa11ba..ec9c3c4 100644 --- a/sys/kern/kern_timeout.c +++ b/sys/kern/kern_timeout.c @@ -296,7 +296,7 @@ callout_cpu_init(struct callout_cpu *cc, int cpu) for (i = 0; i < callwheelsize; i++) LIST_INIT(&cc->cc_callwheel[i]); TAILQ_INIT(&cc->cc_expireq); - cc->cc_firstevent = INT64_MAX; + cc->cc_firstevent = SBT_MAX; for (i = 0; i < 2; i++) cc_cce_cleanup(cc, i); snprintf(cc->cc_ktr_event_name, sizeof(cc->cc_ktr_event_name), @@ -569,8 +569,8 @@ callout_cc_add(struct callout *c, struct callout_cpu *cc, * Inform the eventtimers(4) subsystem there's a new callout * that has been inserted, but only if really required. */ - if (INT64_MAX - c->c_time < c->c_precision) - c->c_precision = INT64_MAX - c->c_time; + if (SBT_MAX - c->c_time < c->c_precision) + c->c_precision = SBT_MAX - c->c_time; sbt = c->c_time + c->c_precision; if (sbt < cc->cc_firstevent) { cc->cc_firstevent = sbt; @@ -961,8 +961,8 @@ callout_reset_sbt_on(struct callout *c, sbintime_t sbt, sbintime_t precision, to_sbt += tick_sbt; } else to_sbt = sbinuptime(); - if (INT64_MAX - to_sbt < sbt) - to_sbt = INT64_MAX; + if (SBT_MAX - to_sbt < sbt) + to_sbt = SBT_MAX; else to_sbt += sbt; pr = ((C_PRELGET(flags) < 0) ? sbt >> tc_precexp : |