introduce io_eagain_read and io_eagain_write (discontinue using io_eagain plz)
parent
d9cbb3940c
commit
39e7ee90bb
@ -0,0 +1,15 @@
|
||||
#include "io_internal.h"
|
||||
|
||||
void io_eagain_read(int64 d) {
|
||||
io_entry* e=iarray_get(&io_fds,d);
|
||||
if (e) {
|
||||
e->canread=0;
|
||||
#if defined(HAVE_SIGIO) || defined(HAVE_EPOLL)
|
||||
if (d==alt_firstread) {
|
||||
debug_printf(("io_eagain: dequeueing %lld from alt read queue (next is %ld)\n",d,e->next_read));
|
||||
alt_firstread=e->next_read;
|
||||
}
|
||||
#endif
|
||||
e->next_read=-1;
|
||||
}
|
||||
}
|
@ -0,0 +1,15 @@
|
||||
#include "io_internal.h"
|
||||
|
||||
void io_eagain_write(int64 d) {
|
||||
io_entry* e=iarray_get(&io_fds,d);
|
||||
if (e) {
|
||||
e->canwrite=0;
|
||||
#if defined(HAVE_SIGIO) || defined(HAVE_EPOLL)
|
||||
if (d==alt_firstwrite) {
|
||||
debug_printf(("io_eagain: dequeueing %lld from alt write queue (next is %ld)\n",d,e->next_write));
|
||||
alt_firstwrite=e->next_write;
|
||||
}
|
||||
#endif
|
||||
e->next_write=-1;
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue