mirror of /home/gitosis/repositories/libowfat.git
Mirror of :pserver:cvs@cvs.fefe.de:/cvs libowfat
https://www.fefe.de/libowfat/
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
58 lines
990 B
58 lines
990 B
#include "io.h" |
|
#include "array.h" |
|
#include "haveepoll.h" |
|
#include "havekqueue.h" |
|
#include "havesigio.h" |
|
#ifdef HAVE_SIGIO |
|
#define _GNU_SOURCE |
|
#include <signal.h> |
|
#endif |
|
|
|
typedef struct { |
|
unsigned int wantread:1; |
|
unsigned int wantwrite:1; |
|
unsigned int canread:1; |
|
unsigned int canwrite:1; |
|
unsigned int nonblock:1; |
|
unsigned int inuse:1; |
|
tai6464 timeout; |
|
long next_read; |
|
long next_write; |
|
void* cookie; |
|
} io_entry; |
|
|
|
extern array io_fds; |
|
extern uint64 io_wanted_fds; |
|
extern array io_pollfds; |
|
|
|
extern long first_readable; |
|
extern long first_writeable; |
|
|
|
enum { |
|
UNDECIDED, |
|
POLL |
|
#ifdef HAVE_KQUEUE |
|
,KQUEUE |
|
#endif |
|
#ifdef HAVE_EPOLL |
|
,EPOLL |
|
#endif |
|
#ifdef HAVE_SIGIO |
|
,_SIGIO |
|
#endif |
|
} io_waitmode; |
|
|
|
#if defined(HAVE_KQUEUE) || defined(HAVE_EPOLL) |
|
extern int io_master; |
|
#endif |
|
#if defined(HAVE_SIGIO) |
|
extern int io_signum; |
|
extern sigset_t io_ss; |
|
|
|
extern long alt_firstread; |
|
extern long alt_firstwrite; |
|
#endif |
|
|
|
int64 io_waituntil2(int64 milliseconds); |
|
|
|
#define debug_printf(x)
|
|
|