Add uc_wqueue_flush() to immedately preform mbuf writes

This commit is contained in:
Nils O. Selåsdal
2015-11-29 01:05:40 +01:00
parent c9aff6f910
commit 9bb7cc335a
2 changed files with 28 additions and 0 deletions
+17
View File
@@ -103,4 +103,21 @@ int uc_wqueue_clear(struct UCWQueue *wqueue);
*/
int uc_wqueue_enqueue(struct UCWQueue *wqueue, struct MBuf *mbuf);
/**
* Immediately write mbufs.
* This invokes the wqueue write callback immediately, just as if an
* write event from the IOMux had happened.
*
* As for a normal write event, the entire queue might not be
* written, if the associated write callback detectes it cannot write
* more data.
*
* @param wqueue
*
* return 0 if no error occured, -1 if the write callback returned
* UC_WQ_ABORT
*/
int uc_wqueue_flush(struct UCWQueue *wqueue);
#endif