File: io_eagain_write.c

package info (click to toggle)
libowfat 0.34-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 5,288 kB
  • sloc: ansic: 20,181; makefile: 16
file content (23 lines) | stat: -rw-r--r-- 529 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#include "io_internal.h"

void io_wantwrite_really(int64 d, io_entry* e);

void io_eagain_write(int64 d) {
  io_entry* e=iarray_get(&io_fds,d);
  if (e) {
    e->canwrite=0;
    if (e->wantwrite && !e->kernelwantwrite)
      io_wantwrite_really(d, e);
#if defined(HAVE_SIGIO)
    if (d==alt_curwrite) {
#if 0
      debug_printf(("io_eagain: dequeueing %lld from alt write queue (next is %ld)\n",d,e->next_write));
      alt_firstwrite=e->next_write;
      e->next_write=-1;
#else
      alt_curwrite=-1;
#endif
    }
#endif
  }
}