mirror of /home/gitosis/repositories/libowfat.git
extend code to cope with edge triggered event notification add io_eagain() so that you can notify io_wait if accept() returned EAGAINmaster
parent
4944158e8b
commit
7a859cb66e
15 changed files with 262 additions and 32 deletions
@ -0,0 +1,19 @@ |
||||
#include "io_internal.h" |
||||
|
||||
void io_eagain(int64 d) { |
||||
io_entry* e=array_get(&io_fds,sizeof(io_entry),d); |
||||
if (e) { |
||||
e->canread=0; |
||||
#ifdef HAVE_SIGIO |
||||
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; |
||||
} |
||||
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_read=-1; |
||||
} |
||||
} |
Loading…
Reference in new issue