All pastes #31196 Raw Edit

Miscellany

public c v1 · immutable
#31196 ·published 2005-11-25 17:01 UTC
rendered paste body
        fprintf(stderr, "Entering scanning loop...\n");        do {                pollfds[0].fd = 0;                pollfds[0].events = POLLIN | POLLPRI | POLLHUP | POLLERR;                pollfds[0].revents = 0;                pollfds[1].fd = fd;                pollfds[1].events = POLLIN | POLLPRI;                pollfds[1].revents = 0;                poll(pollfds, 2, 1);                if(pollfds[1].revents & (POLLIN | POLLPRI)) {                        Can_IntHandler();                        }                gettimeofday(&now, NULL);                if(now.tv_usec >= can_int.tv_usec) {                        can_int.tv_usec = now.tv_usec + 16000L;                        if(can_int.tv_usec > 99999L)                                can_int.tv_usec -= 100000L;                        ProcessDNet();                        processDNetIOData();                        }                if(now.tv_sec >= timer.tv_sec) {                        timer.tv_sec = now.tv_sec + 1;                        }        } while(! pollfds[0].revents);