Date: Thu, 13 Dec 2012 23:05:45 +0000 (UTC) From: Alexander Motin <mav@FreeBSD.org> To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r244196 - projects/calloutng/sys/kern Message-ID: <201212132305.qBDN5j9m032745@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: mav Date: Thu Dec 13 23:05:45 2012 New Revision: 244196 URL: http://svnweb.freebsd.org/changeset/base/244196 Log: Use correct precision for legacy callouts. Zero flags mean precision of half tick, not a full interval. Modified: projects/calloutng/sys/kern/kern_timeout.c Modified: projects/calloutng/sys/kern/kern_timeout.c ============================================================================== --- projects/calloutng/sys/kern/kern_timeout.c Thu Dec 13 23:03:37 2012 (r244195) +++ projects/calloutng/sys/kern/kern_timeout.c Thu Dec 13 23:05:45 2012 (r244196) @@ -938,11 +938,15 @@ _callout_reset_on(struct callout *c, str if (to_ticks > 1) bintime_mul(&to_bt, to_ticks); bintime_add(&to_bt, &now); - to_ticks >>= C_PRELGET(flags); - if (to_ticks == 0) + if (C_PRELGET(flags) == 0) { pr = halftick_bt; - else - bintime_mul(&pr, to_ticks); + } else { + to_ticks >>= C_PRELGET(flags); + if (to_ticks == 0) + pr = halftick_bt; + else + bintime_mul(&pr, to_ticks); + } } else { to_bt = *bt; if (precision != NULL)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201212132305.qBDN5j9m032745>