projects
/
lcr.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[chan_lcr] Fixed broken communication with chan_lcr
[lcr.git]
/
select.c
diff --git
a/select.c
b/select.c
index
b22cb12
..
8763739
100644
(file)
--- a/
select.c
+++ b/
select.c
@@
-88,12
+88,9
@@
int select_main(int polling, int *global_change, void (*lock)(void), void (*unlo
* if no future timeout exists, select will wait infinit.
*/
* if no future timeout exists, select will wait infinit.
*/
-printf("-"); fflush(stdout);
again:
again:
-printf("1"); fflush(stdout);
/* process all work events */
if (next_work()) {
/* process all work events */
if (next_work()) {
-printf("2"); fflush(stdout);
work = 1;
goto again;
}
work = 1;
goto again;
}
@@
-101,9
+98,7
@@
printf("2"); fflush(stdout);
/* process timer events and get timeout for next timer event */
temp = 0;
timer = nearest_timer(&select_timer, &temp);
/* process timer events and get timeout for next timer event */
temp = 0;
timer = nearest_timer(&select_timer, &temp);
-printf("3"); fflush(stdout);
if (temp) {
if (temp) {
-printf("4"); fflush(stdout);
work = 1;
goto again;
}
work = 1;
goto again;
}
@@
-117,7
+112,6
@@
printf("4"); fflush(stdout);
FD_ZERO(&writeset);
FD_ZERO(&exceptset);
FD_ZERO(&writeset);
FD_ZERO(&exceptset);
-printf("5"); fflush(stdout);
/* prepare read and write fdsets */
lcr_fd = fd_first;
while(lcr_fd) {
/* prepare read and write fdsets */
lcr_fd = fd_first;
while(lcr_fd) {
@@
-129,7
+123,6
@@
printf("5"); fflush(stdout);
FD_SET(lcr_fd->fd, &exceptset);
lcr_fd = lcr_fd->next;
}
FD_SET(lcr_fd->fd, &exceptset);
lcr_fd = lcr_fd->next;
}
-printf("6"); fflush(stdout);
if (unlock)
unlock();
if (unlock)
unlock();
@@
-145,7
+138,6
@@
printf("6"); fflush(stdout);
*global_change = 0;
return 1;
}
*global_change = 0;
return 1;
}
-printf("7"); fflush(stdout);
/* fire timers */
#if 0
/* fire timers */
#if 0
@@
-154,7
+146,6
@@
printf("7"); fflush(stdout);
/* call registered callback functions */
restart:
/* call registered callback functions */
restart:
-printf("8"); fflush(stdout);
unregistered = 0;
lcr_fd = fd_first;
while(lcr_fd) {
unregistered = 0;
lcr_fd = fd_first;
while(lcr_fd) {
@@
-173,12
+164,10
@@
printf("8"); fflush(stdout);
FD_CLR(lcr_fd->fd, &exceptset);
}
if (flags) {
FD_CLR(lcr_fd->fd, &exceptset);
}
if (flags) {
-printf("9"); fflush(stdout);
work = 1;
lcr_fd->cb(lcr_fd, flags, lcr_fd->cb_instance, lcr_fd->cb_index);
if (unregistered)
goto restart;
work = 1;
lcr_fd->cb(lcr_fd, flags, lcr_fd->cb_instance, lcr_fd->cb_index);
if (unregistered)
goto restart;
-printf("-"); fflush(stdout);
return 1;
}
lcr_fd = lcr_fd->next;
return 1;
}
lcr_fd = lcr_fd->next;