2003-09-12 22:03:51 +00:00
|
|
|
#include "io_internal.h"
|
|
|
|
|
2021-04-24 12:48:50 +00:00
|
|
|
void io_wantwrite_really(int64 d, io_entry* e);
|
|
|
|
|
2003-09-12 22:03:51 +00:00
|
|
|
void io_eagain(int64 d) {
|
2014-04-04 18:11:03 +00:00
|
|
|
io_entry* e=iarray_get(&io_fds,d);
|
2003-09-12 22:03:51 +00:00
|
|
|
if (e) {
|
2003-11-06 20:47:59 +00:00
|
|
|
if (e->wantread) e->canread=0;
|
|
|
|
if (e->wantwrite) e->canwrite=0;
|
2021-04-24 11:39:18 +00:00
|
|
|
if (e->wantwrite && !e->kernelwantwrite)
|
2021-04-24 12:47:18 +00:00
|
|
|
io_wantwrite_really(d,e);
|
2014-08-28 19:03:57 +00:00
|
|
|
#if defined(HAVE_SIGIO)
|
2016-10-04 21:31:14 +00:00
|
|
|
if (d==alt_curread) {
|
|
|
|
#if 0
|
2003-09-12 22:03:51 +00:00
|
|
|
debug_printf(("io_eagain: dequeueing %lld from alt read queue (next is %ld)\n",d,e->next_read));
|
|
|
|
alt_firstread=e->next_read;
|
2014-10-19 01:52:36 +00:00
|
|
|
e->next_read=-1;
|
2016-10-04 21:31:14 +00:00
|
|
|
#else
|
|
|
|
alt_curread=-1;
|
|
|
|
#endif
|
2003-09-12 22:03:51 +00:00
|
|
|
}
|
|
|
|
if (d==alt_firstwrite) {
|
2016-10-04 21:31:14 +00:00
|
|
|
#if 0
|
2003-09-12 22:03:51 +00:00
|
|
|
debug_printf(("io_eagain: dequeueing %lld from alt write queue (next is %ld)\n",d,e->next_write));
|
|
|
|
alt_firstwrite=e->next_write;
|
2014-10-19 01:52:36 +00:00
|
|
|
e->next_write=-1;
|
2016-10-04 21:31:14 +00:00
|
|
|
#else
|
|
|
|
alt_curwrite=-1;
|
|
|
|
#endif
|
2003-09-12 22:03:51 +00:00
|
|
|
}
|
|
|
|
#endif
|
|
|
|
}
|
|
|
|
}
|