Skip to content

Instantly share code, notes, and snippets.

@bogdan-iancu
Created March 22, 2016 10:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bogdan-iancu/a20e800fbfc0477db138 to your computer and use it in GitHub Desktop.
Save bogdan-iancu/a20e800fbfc0477db138 to your computer and use it in GitHub Desktop.
diff --git a/io_wait.h b/io_wait.h
index 79a5ae9..a5d25bc 100644
--- a/io_wait.h
+++ b/io_wait.h
@@ -354,7 +354,7 @@ inline static int io_watch_add( io_wait_h* h,
LM_DBG("[%s] io_watch_add op (%d on %d) (%p, %d, %d, %p,%d), fd_no=%d/%d\n",
h->name,fd,h->epfd, h,fd,type,data,flags,h->fd_no,h->max_fd_no);
#else
- LM_DBG("[%s] io_watch_add op (%d) (%p, %d, %d, %p,%d), fd_no=%d/%d\n",
+ LM_NOTICE("[%s] io_watch_add op (%d) (%p, %d, %d, %p,%d), fd_no=%d/%d\n",
h->name,fd, h,fd,type,data,flags,h->fd_no,h->max_fd_no);
#endif
//fd_array_print;
@@ -596,7 +596,7 @@ inline static int io_watch_del(io_wait_h* h, int fd, int idx,
LM_CRIT("[%s] invalid fd %d, not in [0, %d)\n", h->name, fd, h->fd_no);
goto error0;
}
- LM_DBG("[%s] io_watch_del op on index %d %d (%p, %d, %d, 0x%x,0x%x) "
+ LM_NOTICE("[%s] io_watch_del op on index %d %d (%p, %d, %d, 0x%x,0x%x) "
"fd_no=%d called\n", h->name,idx,fd, h, fd, idx, flags,
sock_flags,h->fd_no);
//fd_array_print;
diff --git a/io_wait_loop.h b/io_wait_loop.h
index 8f434f0..056c860 100644
--- a/io_wait_loop.h
+++ b/io_wait_loop.h
@@ -166,6 +166,9 @@ again:
}
}
for (r=0; r<n; r++) {
+ LM_NOTICE("[%s] triggering fd %d, events %d\n",
+ h->name, h->ep_array[r].data.fd, h->ep_array[r].events);
+
if (h->ep_array[r].events & EPOLLIN) {
if (h->ep_array[r].events&EPOLLHUP) {
LM_DBG("EPOLLIN(read) event: epollwait() "
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment