aboutsummaryrefslogtreecommitdiffstats
path: root/extras/libmemif/src/libmemif.h
diff options
context:
space:
mode:
Diffstat (limited to 'extras/libmemif/src/libmemif.h')
-rw-r--r--extras/libmemif/src/libmemif.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/extras/libmemif/src/libmemif.h b/extras/libmemif/src/libmemif.h
index a2d1a5e28b5..da48edd4dee 100644
--- a/extras/libmemif/src/libmemif.h
+++ b/extras/libmemif/src/libmemif.h
@@ -72,6 +72,7 @@ typedef enum
MEMIF_ERR_DISCONNECT, /*!< disconenct received */
MEMIF_ERR_DISCONNECTED, /*!< peer interface disconnected */
MEMIF_ERR_UNKNOWN_MSG, /*!< unknown message type */
+ MEMIF_ERR_POLL_CANCEL, /*!< memif_poll_event() was cancelled */
} memif_err_t;
/**
@@ -438,6 +439,21 @@ int memif_rx_burst (memif_conn_handle_t conn, uint16_t qid,
\return memif_err_t
*/
int memif_poll_event (int timeout);
+
+/** \brief Send signal to stop concurrently running memif_poll_event().
+
+ The function, however, does not wait for memif_poll_event() to stop.
+ memif_poll_event() may still return simply because an event has occured
+ or the timeout has elapsed, but if called repeatedly in an infinite loop,
+ a canceled memif_poll_event() is guaranted to return MEMIF_ERR_POLL_CANCEL
+ in the shortest possible time.
+ This feature was not available in the first release.
+ Use macro MEMIF_HAVE_CANCEL_POLL_EVENT to check if the feature is present.
+
+ \return memif_err_t
+*/
+#define MEMIF_HAVE_CANCEL_POLL_EVENT 1
+int memif_cancel_poll_event ();
/** @} */
#endif /* _LIBMEMIF_H_ */