add some debug stuff
This commit is contained in:
parent
dd61fe2f56
commit
e1e80badf0
@ -23,6 +23,11 @@
|
|||||||
#include <sys/devpoll.h>
|
#include <sys/devpoll.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#define DEBUG
|
||||||
|
#ifdef DEBUG
|
||||||
|
#include <stdio.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
int64 io_waituntil2(int64 milliseconds) {
|
int64 io_waituntil2(int64 milliseconds) {
|
||||||
struct pollfd* p;
|
struct pollfd* p;
|
||||||
long i,j,r;
|
long i,j,r;
|
||||||
@ -86,6 +91,10 @@ int64 io_waituntil2(int64 milliseconds) {
|
|||||||
e->next_write=first_writeable;
|
e->next_write=first_writeable;
|
||||||
first_writeable=y[i].ident;
|
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;
|
return n;
|
||||||
@ -122,6 +131,10 @@ int64 io_waituntil2(int64 milliseconds) {
|
|||||||
first_writeable=y[i].fd;
|
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;
|
return n;
|
||||||
@ -167,6 +180,10 @@ int64 io_waituntil2(int64 milliseconds) {
|
|||||||
e->next_write=first_writeable;
|
e->next_write=first_writeable;
|
||||||
first_writeable=info.si_fd;
|
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
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user