Index: ossp-pkg/pth/ChangeLog RCS File: /v/ossp/cvs/ossp-pkg/pth/ChangeLog,v rcsdiff -q -kk '-r1.594' '-r1.595' -u '/v/ossp/cvs/ossp-pkg/pth/ChangeLog,v' 2>/dev/null --- ChangeLog 2002/11/08 16:05:54 1.594 +++ ChangeLog 2002/11/08 16:17:47 1.595 @@ -21,6 +21,10 @@ Changes between 2.0b0 and 2.0b1 (07-Nov-2002 to xx-Nov-2002) + *) Make sure that in the even manager a polling-only select(2) call + uses a correctly initialized timeout parameter. + [Ralf S. Engelschall] + *) Added soft and hard syscall mapping for nanosleep(3) and usleep(3) functions. [Ralf S. Engelschall] Index: ossp-pkg/pth/pth_sched.c RCS File: /v/ossp/cvs/ossp-pkg/pth/pth_sched.c,v rcsdiff -q -kk '-r1.85' '-r1.86' -u '/v/ossp/cvs/ossp-pkg/pth/pth_sched.c,v' 2>/dev/null --- 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) {