From owner-freebsd-current Thu Sep 25 02:08:06 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id CAA06791 for current-outgoing; Thu, 25 Sep 1997 02:08:06 -0700 (PDT) Received: from godzilla.zeta.org.au (godzilla.zeta.org.au [203.2.228.19]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id CAA06761 for ; Thu, 25 Sep 1997 02:07:59 -0700 (PDT) Received: (from bde@localhost) by godzilla.zeta.org.au (8.8.5/8.6.9) id SAA06295; Thu, 25 Sep 1997 18:38:01 +1000 Date: Thu, 25 Sep 1997 18:38:01 +1000 From: Bruce Evans Message-Id: <199709250838.SAA06295@godzilla.zeta.org.au> To: gibbs@plutotech.com, julian@whistle.com Subject: Re: new timeout routines Cc: bde@zeta.org.au, current@FreeBSD.ORG, nate@mt.sri.com, tlambert@primenet.com Sender: owner-freebsd-current@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk >there is an assumption in a lot of code that untimeout is idempotent >(did I get that right?). It can be called whenever you are recovering >from unknown situations with the sure knowledge that the appropriate >timeout will be removed. This was an invalid assumption, since timeout() was only (almost) nilpotent (calling it N+1 times has the same effect as calling it N times for some value of N, provided there are no calls to timeout() mixed with the calls to untimeout()). Now it is (almost) idempotent (N = 1 in the above), provided the cookies are managed properly. Correct cookie management corresponds to using the correct value of N in the old version. Bruce