Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id ; Thu, 8 Nov 2001 00:30:06 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id ; Thu, 8 Nov 2001 00:29:56 -0500 Received: from neon-gw-l3.transmeta.com ([63.209.4.196]:60686 "EHLO neon-gw.transmeta.com") by vger.kernel.org with ESMTP id ; Thu, 8 Nov 2001 00:29:44 -0500 Date: Wed, 7 Nov 2001 21:26:11 -0800 (PST) From: Linus Torvalds To: Krishna Kumar cc: Andreas Dilger , , , "David S. Miller" , , , , , , Subject: Re: [PATCH] net/ipv4/*, net/core/neighbour.c jiffies cleanup In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 7 Nov 2001, Krishna Kumar wrote: > > > > In short: It is wrong to do > > > > if (jiffies <= start+HZ) > > > > and it is _right_ to do > > > > if (jiffies - start <= HZ) > > Actually this last part is wrong, isn't it ? jiffies <= start + HZ is also > a correct way to do it, since start+HZ will overflow to the current value > of jiffies when HZ time elapses. So the above two statements are IDENTICAL. No. Try it out with a few examples. You'll see. Linus - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/