OSSP CVS Repository

ossp - Difference in ossp-pkg/pth/pth_sched.c versions 1.85 and 1.86
Not logged in
[Honeypot]  [Browse]  [Home]  [Login]  [Reports
[Search]  [Ticket]  [Timeline
  [History

ossp-pkg/pth/pth_sched.c 1.85 -> 1.86

--- pth_sched.c  2002/11/07 15:38:40     1.85
+++ pth_sched.c  2002/11/08 16:17:47     1.86
@@ -655,9 +655,6 @@
        additionally if a thread has one occurred event, we move it from the
        waiting queue to the ready queue */
 
-    /* pre-configure a raw polling timeout for later checks (see below) */
-    pth_time_set(&delay, PTH_TIME_ZERO);
-
     /* for all threads in the waiting queue... */
     t = pth_pqueue_head(&pth_WQ);
     while (t != NULL) {
@@ -693,6 +690,7 @@
                                 FD_SET(ev->ev_args.FD.fd, &wfds);
                             if (ev->ev_goal & PTH_UNTIL_FD_EXCEPTION)
                                 FD_SET(ev->ev_args.FD.fd, &efds);
+                            pth_time_set(&delay, PTH_TIME_ZERO);
                             while ((rc2 = pth_sc(select)(ev->ev_args.FD.fd+1, &rfds, &wfds, &efds, &delay)) < 0
                                    && errno == EINTR) ;
                             if (rc2 > 0) {
@@ -748,6 +746,7 @@
                                 memcpy(&tefds, ev->ev_args.SELECT.efds, sizeof(efds));
                                 pefds = &tefds;
                             }
+                            pth_time_set(&delay, PTH_TIME_ZERO);
                             while ((rc2 = pth_sc(select)(ev->ev_args.SELECT.nfd+1, prfds, pwfds, pefds, &delay)) < 0
                                    && errno == EINTR) ;
                             if (rc2 < 0) {

CVSTrac 2.0.1