#define EVENT_OUTPUT 0x02
#define EVENT_EXCEPT 0x04
#define EVENT_TIMEOUT 0x08
- int force_event;
IOC_CALLBACK fun;
IOC_SOCKETFUN socketfun;
IOC_MASKFUN maskfun;
int thread_users;
iochan_man_t man;
-
+ char *name;
struct iochan *next;
} *IOCHAN;
#define iochan_destroy(i) (void)((i)->destroyed = 1)
#define iochan_getfd(i) ((i)->fd)
-#define iochan_setfd(i, f) ((i)->fd = (f))
#define iochan_getdata(i) ((i)->data)
#define iochan_setdata(i, d) ((i)->data = d)
-#define iochan_getflags(i) ((i)->flags)
#define iochan_setflags(i, d) ((i)->flags = d)
#define iochan_setflag(i, d) ((i)->flags |= d)
#define iochan_clearflag(i, d) ((i)->flags &= ~(d))
#define iochan_getflag(i, d) ((i)->flags & d ? 1 : 0)
-#define iochan_getfun(i) ((i)->fun)
-#define iochan_setfun(i, d) ((i)->fun = d)
-#define iochan_setevent(i, e) ((i)->force_event = (e))
#define iochan_settimeout(i, t) ((i)->max_idle = (t), (i)->last_event = time(0))
#define iochan_activity(i) ((i)->last_event = time(0))
#define iochan_setsocketfun(i, f) ((i)->socketfun = (f))
#define iochan_setmaskfun(i, f) ((i)->maskfun = (f))
#define iochan_getmaskfun(i) ((i)->maskfun)
-IOCHAN iochan_create(int fd, IOC_CALLBACK cb, int flags);
+IOCHAN iochan_create(int fd, IOC_CALLBACK cb, int flags, const char *name);
#endif
/*