From owner-cvs-sys Tue Feb 24 20:11:10 1998 Return-Path: Received: (from daemon@localhost) by hub.freebsd.org (8.8.8/8.8.8) id UAA23590 for cvs-sys-outgoing; Tue, 24 Feb 1998 20:11:10 -0800 (PST) (envelope-from owner-cvs-sys) Received: from freefall.freebsd.org (freefall.FreeBSD.ORG [204.216.27.21]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id UAA23536; Tue, 24 Feb 1998 20:10:52 -0800 (PST) (envelope-from bde@FreeBSD.org) From: Bruce Evans Received: (from bde@localhost) by freefall.freebsd.org (8.8.8/8.8.5) id UAA01288; Tue, 24 Feb 1998 20:10:33 -0800 (PST) Date: Tue, 24 Feb 1998 20:10:33 -0800 (PST) Message-Id: <199802250410.UAA01288@freefall.freebsd.org> To: cvs-committers@FreeBSD.ORG, cvs-all@FreeBSD.ORG, cvs-sys@FreeBSD.ORG Subject: cvs commit: src/sys/kern kern_time.c Sender: owner-cvs-sys@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk bde 1998/02/24 20:10:33 PST Modified files: sys/kern kern_time.c Log: Fixed the calculation of `delta' in settime(). We once set all times consistently wrong (up to 1 tick too late), but recent changes fixed the setting of the main clock, making other times inconsistent. The inconsistencies tended to show up as a negative resource usage for the process that set the time. Fixed the check for setting the clock backwards. A stale timestamp (`time') was checked, so it was possible to set the clock backwards by up to almost 1 tick. Until recently, this bug was compensated for by setting the clock consistently wrong. Merged the comment about setting the clock backwards from Lite2. Removed latency micro-optimizations/speed pessimizations in settime(). microtime() and set_timecounter() are relatively expensive, and they must be called together with clock updates blocked to get a consistent `delta', so significant latency optimizations are not possible. Removed some stale comments. Revision Changes Path 1.42 +14 -29 src/sys/kern/kern_time.c