Source-Changes-HG archive

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

[src/netbsd-1-5]: src/sys/compat/netbsd32 Pull up rev. 1.33:



details:   https://anonhg.NetBSD.org/src/rev/cb7f9ba7250d
branches:  netbsd-1-5
changeset: 488500:cb7f9ba7250d
user:      thorpej <thorpej%NetBSD.org@localhost>
date:      Thu Jul 13 20:20:27 2000 +0000

description:
Pull up rev. 1.33:
Sync w/ kern_time.c and sys_generic.c

diffstat:

 sys/compat/netbsd32/netbsd32_netbsd.c |  24 +++++++++++++-----------
 1 files changed, 13 insertions(+), 11 deletions(-)

diffs (53 lines):

diff -r fb002a6d232c -r cb7f9ba7250d sys/compat/netbsd32/netbsd32_netbsd.c
--- a/sys/compat/netbsd32/netbsd32_netbsd.c     Thu Jul 13 20:19:20 2000 +0000
+++ b/sys/compat/netbsd32/netbsd32_netbsd.c     Thu Jul 13 20:20:27 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: netbsd32_netbsd.c,v 1.28 2000/05/30 20:54:26 eeh Exp $ */
+/*     $NetBSD: netbsd32_netbsd.c,v 1.28.2.1 2000/07/13 20:20:27 thorpej Exp $ */
 
 /*
  * Copyright (c) 1998 Matthew R. Green
@@ -2320,6 +2320,10 @@
        if (which == ITIMER_REAL) {
                callout_stop(&p->p_realit_ch);
                if (timerisset(&aitv.it_value)) {
+                       /*
+                        * Don't need to check hzto() return value, here.
+                        * callout_reset() does it for us.
+                        */
                        timeradd(&aitv.it_value, &time, &aitv.it_value);
                        callout_reset(&p->p_realit_ch, hzto(&aitv.it_value),
                            realitexpire, p);
@@ -2466,12 +2470,6 @@
                }
                s = splclock();
                timeradd(&atv, &time, &atv);
-               timo = hzto(&atv);
-               /*
-                * Avoid inadvertently sleeping forever.
-                */
-               if (timo == 0)
-                       timo = 1;
                splx(s);
        } else
                timo = 0;
@@ -2482,11 +2480,15 @@
                           (fd_mask *)(bits + ni * 3), SCARG(uap, nd), retval);
        if (error || *retval)
                goto done;
+       if (SCARG(uap, tv)) {
+               /*
+                * We have to recalculate the timeout on every retry.
+                */
+               timo = hzto(&atv);
+               if (timo <= 0)
+                       goto done;
+       }
        s = splhigh();
-       if (timo && timercmp(&time, &atv, >=)) {
-               splx(s);
-               goto done;
-       }
        if ((p->p_flag & P_SELECT) == 0 || nselcoll != ncoll) {
                splx(s);
                goto retry;



Home | Main Index | Thread Index | Old Index