Pass the wqueue directly to the wqueue callback functions

This commit is contained in:
Nils O. Selåsdal
2015-12-04 22:25:57 +01:00
parent 1d26348bb0
commit 94dcd522aa
3 changed files with 14 additions and 9 deletions
+7 -2
View File
@@ -24,6 +24,8 @@ enum UC_WQ_RESULT {
UC_WQ_ABORT = -1
};
struct UCWQueue;
/**
* Callback that will be called when data can be written to the fd.
* The return value from this function must be strictly followed.
@@ -49,7 +51,9 @@ enum UC_WQ_RESULT {
* for this event.
*
*/
typedef enum UC_WQ_RESULT (*wqueue_write_cb)(struct IOMux *mux, struct IOMuxFD *fd, struct MBuf *mbuf);
typedef enum UC_WQ_RESULT (*wqueue_write_cb)(struct IOMux *mux,
struct UCWQueue *wqueue,
struct MBuf *mbuf);
/**
* Callback when read events are indicated.
@@ -60,7 +64,8 @@ typedef enum UC_WQ_RESULT (*wqueue_write_cb)(struct IOMux *mux, struct IOMuxFD *
* @param mux associated IOMux
* @param the fd of the current wqueue
*/
typedef enum UC_WQ_RESULT (*wqueue_read_cb)(struct IOMux *mux, struct IOMuxFD *fd);
typedef enum UC_WQ_RESULT (*wqueue_read_cb)(struct IOMux *mux,
struct UCWQueue *wqueue);
/**
* Represents a queue of data to write.