simon-svn: putty: ben

Commits to Tartarus CVS repository. tartarus-commits at lists.tartarus.org
Tue Sep 18 22:42:49 BST 2012


SVN root:       svn://svn.tartarus.org/sgt
Changes by:     ben
Revision:       9667
Date:           2012-09-18 22:42:48 +0100 (Tue, 18 Sep 2012)

Log message (14 lines):
Two related changes to timing code:

First, make absolute times unsigned.  This means that it's safe to 
depend on their overflow behaviour (which is undefined for signed 
integers).  This requires a little extra care in handling comparisons, 
but I think I've correctly adjusted them all.

Second, functions registered with schedule_timer() are guaranteed to be 
called with precisely the time that was returned by schedule_timer().  
Thus, it's only necessary to check these values for equality rather than 
doing risky range checks, so do that.

The timing code still does lots that's undefined, unnecessary, or just
wrong, but this is a good start.

Modified files:
U   putty/notiming.c
U   putty/pinger.c
U   putty/putty.h
U   putty/ssh.c
U   putty/sshrand.c
U   putty/terminal.c
U   putty/timing.c
U   putty/unix/gtkwin.c
U   putty/unix/uxcons.c
U   putty/unix/uxplink.c
U   putty/unix/uxsftp.c
U   putty/windows/wincons.c
U   putty/windows/window.c
U   putty/windows/winplink.c
U   putty/windows/winser.c
U   putty/windows/winsftp.c

Links:
http://svn.tartarus.org/sgt/?rev=9667&view=rev
http://svn.tartarus.org/sgt/putty/notiming.c?rev=9667&r1=9666&r2=9667
http://svn.tartarus.org/sgt/putty/pinger.c?rev=9667&r1=9666&r2=9667
http://svn.tartarus.org/sgt/putty/putty.h?rev=9667&r1=9666&r2=9667
http://svn.tartarus.org/sgt/putty/ssh.c?rev=9667&r1=9666&r2=9667
http://svn.tartarus.org/sgt/putty/sshrand.c?rev=9667&r1=9666&r2=9667
http://svn.tartarus.org/sgt/putty/terminal.c?rev=9667&r1=9666&r2=9667
http://svn.tartarus.org/sgt/putty/timing.c?rev=9667&r1=9666&r2=9667
http://svn.tartarus.org/sgt/putty/unix/gtkwin.c?rev=9667&r1=9666&r2=9667
http://svn.tartarus.org/sgt/putty/unix/uxcons.c?rev=9667&r1=9666&r2=9667
http://svn.tartarus.org/sgt/putty/unix/uxplink.c?rev=9667&r1=9666&r2=9667
http://svn.tartarus.org/sgt/putty/unix/uxsftp.c?rev=9667&r1=9666&r2=9667
http://svn.tartarus.org/sgt/putty/windows/wincons.c?rev=9667&r1=9666&r2=9667
http://svn.tartarus.org/sgt/putty/windows/window.c?rev=9667&r1=9666&r2=9667
http://svn.tartarus.org/sgt/putty/windows/winplink.c?rev=9667&r1=9666&r2=9667
http://svn.tartarus.org/sgt/putty/windows/winser.c?rev=9667&r1=9666&r2=9667
http://svn.tartarus.org/sgt/putty/windows/winsftp.c?rev=9667&r1=9666&r2=9667



More information about the tartarus-commits mailing list