summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Eversberg2010-06-22 09:47:56 +0200
committerAndreas Eversberg2010-06-22 09:47:56 +0200
commit8155a3b252d8f5193e290ac4c2f6e667ef865d09 (patch)
treeff03d0e7d4666a0ece88624740cbc278851d9ffa
parentDebugging select loop. Here the process freezes. (diff)
downloadlcr-8155a3b252d8f5193e290ac4c2f6e667ef865d09.tar.gz
lcr-8155a3b252d8f5193e290ac4c2f6e667ef865d09.tar.xz
lcr-8155a3b252d8f5193e290ac4c2f6e667ef865d09.zip
More debug
-rw-r--r--chan_lcr.c6
-rw-r--r--select.c1
2 files changed, 7 insertions, 0 deletions
diff --git a/chan_lcr.c b/chan_lcr.c
index 701d8a2..a681e79 100644
--- a/chan_lcr.c
+++ b/chan_lcr.c
@@ -1528,6 +1528,7 @@ static int handle_socket(struct lcr_fd *fd, unsigned int what, void *instance, i
struct admin_list *admin;
struct admin_message msg;
+ lock_debug("handle+");
if ((what & LCR_FD_READ)) {
/* read from socket */
len = read(lcr_sock, &msg, sizeof(msg));
@@ -1538,6 +1539,7 @@ static int handle_socket(struct lcr_fd *fd, unsigned int what, void *instance, i
close_socket();
release_all_calls();
schedule_timer(&socket_retry, SOCKET_RETRY_TIMER, 0);
+ lock_debug("handle-");
return 0;
}
if (len > 0) {
@@ -1560,6 +1562,7 @@ static int handle_socket(struct lcr_fd *fd, unsigned int what, void *instance, i
/* write to socket */
if (!admin_first) {
socket_fd.when &= ~LCR_FD_WRITE;
+ lock_debug("handle-");
return 0;
}
admin = admin_first;
@@ -1583,6 +1586,7 @@ static int handle_socket(struct lcr_fd *fd, unsigned int what, void *instance, i
}
}
+ lock_debug("handle-");
return 0;
}
@@ -1655,9 +1659,11 @@ static int wake_event(struct lcr_fd *fd, unsigned int what, void *instance, int
{
char byte;
+ lock_debug("wake+");
read(wake_pipe[0], &byte, 1);
wake_global = 0;
+ lock_debug("wake-");
return 0;
}
diff --git a/select.c b/select.c
index b22cb12..7e73771 100644
--- a/select.c
+++ b/select.c
@@ -176,6 +176,7 @@ printf("8"); fflush(stdout);
printf("9"); fflush(stdout);
work = 1;
lcr_fd->cb(lcr_fd, flags, lcr_fd->cb_instance, lcr_fd->cb_index);
+printf("0"); fflush(stdout);
if (unregistered)
goto restart;
printf("-"); fflush(stdout);