Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/kern kevent(2): if the specified timeout is >=1ns and <1...



details:   https://anonhg.NetBSD.org/src/rev/bccfd221b8e2
branches:  trunk
changeset: 539125:bccfd221b8e2
user:      jdolecek <jdolecek%NetBSD.org@localhost>
date:      Fri Nov 08 20:26:50 2002 +0000

description:
kevent(2): if the specified timeout is >=1ns and <1us, perform a poll
  rather than waiting forever due to TIMESPEC_TO_TIMEVAL() conversion

diffstat:

 sys/kern/kern_event.c |  4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diffs (18 lines):

diff -r 2ebc0e3f822e -r bccfd221b8e2 sys/kern/kern_event.c
--- a/sys/kern/kern_event.c     Fri Nov 08 19:53:29 2002 +0000
+++ b/sys/kern/kern_event.c     Fri Nov 08 20:26:50 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: kern_event.c,v 1.3 2002/10/23 09:14:14 jdolecek Exp $  */
+/*     $NetBSD: kern_event.c,v 1.4 2002/11/08 20:26:50 jdolecek Exp $  */
 /*-
  * Copyright (c) 1999,2000,2001 Jonathan Lemon <jlemon%FreeBSD.org@localhost>
  * All rights reserved.
@@ -816,7 +816,7 @@
                s = splclock();
                timeradd(&atv, &time, &atv);    /* calc. time to wait until */
                splx(s);
-               if (tsp->tv_sec == 0 && tsp->tv_nsec == 0)
+               if (tsp->tv_sec == 0 && tsp->tv_nsec < 1000 /*<1us*/)
                        timeout = -1;           /* perform a poll */
                else 
                        timeout = hzto(&atv);   /* calculate hz till timeout */



Home | Main Index | Thread Index | Old Index