From: art Date: Thu, 23 Mar 2000 10:27:05 +0000 (+0000) Subject: Preserve the FIFO order of issued timeouts. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=c4a91ed59d3ecfddfd91253a6b6dfebf58ae9e05;p=openbsd Preserve the FIFO order of issued timeouts. --- diff --git a/sys/kern/kern_timeout.c b/sys/kern/kern_timeout.c index 9ebbc55ddd6..f6274b691e5 100644 --- a/sys/kern/kern_timeout.c +++ b/sys/kern/kern_timeout.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kern_timeout.c,v 1.1 2000/03/23 09:59:57 art Exp $ */ +/* $OpenBSD: kern_timeout.c,v 1.2 2000/03/23 10:27:05 art Exp $ */ /* * Copyright (c) 2000 Artur Grabowski * All rights reserved. @@ -140,7 +140,7 @@ timeout_add(new, to_ticks) * will timeout after we do, insert the new timeout there. */ TAILQ_FOREACH(to, &timeout_todo, to_list) { - if (to->to_time - ticks >= to_ticks) { + if (to->to_time - ticks > to_ticks) { TAILQ_INSERT_BEFORE(to, new, to_list); goto out; }