Pass the wqueue directly to the wqueue callback functions
This commit is contained in:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user