From e1e80badf0ac9587182f3df8e28685798b98092b Mon Sep 17 00:00:00 2001 From: leitner Date: Wed, 24 Aug 2005 17:13:35 +0000 Subject: [PATCH] add some debug stuff --- io/io_waituntil2.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/io/io_waituntil2.c b/io/io_waituntil2.c index f1c3ff1..5af8585 100644 --- a/io/io_waituntil2.c +++ b/io/io_waituntil2.c @@ -23,6 +23,11 @@ #include #endif +#define DEBUG +#ifdef DEBUG +#include +#endif + int64 io_waituntil2(int64 milliseconds) { struct pollfd* p; long i,j,r; @@ -86,6 +91,10 @@ int64 io_waituntil2(int64 milliseconds) { e->next_write=first_writeable; first_writeable=y[i].ident; } +#ifdef DEBUG + } else { + fprintf(stderr,"got kevent on fd#%d, which is not in array!\n",y[n].ident); +#endif } } return n; @@ -122,6 +131,10 @@ int64 io_waituntil2(int64 milliseconds) { first_writeable=y[i].fd; } } +#ifdef DEBUG + } else { + fprintf(stderr,"got kevent on fd#%d, which is not in array!\n",y[n].fd); +#endif } } return n; @@ -167,6 +180,10 @@ int64 io_waituntil2(int64 milliseconds) { e->next_write=first_writeable; first_writeable=info.si_fd; } +#ifdef DEBUG + } else { + fprintf(stderr,"got kevent on fd#%d, which is not in array!\n",info.si_fd); +#endif } } }