Added support for turbo xml (txml)
[pazpar2-moved-to-github.git] / src / eventl.h
index 0eb8201..e4d8b6b 100644 (file)
@@ -28,6 +28,8 @@ typedef void (*IOC_CALLBACK)(struct iochan *i, int event);
 typedef int (*IOC_SOCKETFUN)(struct iochan *i);
 typedef int (*IOC_MASKFUN)(struct iochan *i);
 
+typedef struct iochan_man_s *iochan_man_t;
+
 typedef struct iochan
 {
     int fd;
@@ -44,13 +46,16 @@ typedef struct iochan
     int destroyed;
     time_t last_event;
     time_t max_idle;
-    
+    int this_event;
+    int thread_users;
+
+    iochan_man_t man;
+    char *name;
     struct iochan *next;
 } *IOCHAN;
 
-typedef struct iochan_man_s *iochan_man_t;
 
-iochan_man_t iochan_man_create(void);
+iochan_man_t iochan_man_create(int no_threads);
 void iochan_add(iochan_man_t man, IOCHAN chan);
 void iochan_man_events(iochan_man_t man);
 void iochan_man_destroy(iochan_man_t *mp);
@@ -75,6 +80,15 @@ void iochan_man_destroy(iochan_man_t *mp);
 #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
+/*
+ * Local variables:
+ * c-basic-offset: 4
+ * c-file-style: "Stroustrup"
+ * indent-tabs-mode: nil
+ * End:
+ * vim: shiftwidth=4 tabstop=8 expandtab
+ */
+