summaryrefslogtreecommitdiffstats
path: root/extras/libmemif/src/libmemif.h
diff options
context:
space:
mode:
authorJakub Grajciar <jgrajcia@cisco.com>2019-11-14 10:47:25 +0100
committerDamjan Marion <dmarion@me.com>2020-01-27 19:21:33 +0000
commit6f090fa1fa44bb2de0565bbedb2756e37ea35040 (patch)
treeb661976fa07e49f88c98196fe3f6be0e24bf9f96 /extras/libmemif/src/libmemif.h
parent37157d52794f7f5774435d7bd524e3f998213a8a (diff)
libmemif: memif_control_fd_update always pass context from libmemif_main
Event polling instance is always identified by libmemif main private context. Fixes event polling handled by libmemif. Type: fix Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com> Change-Id: I51dcdb279b18f8ce97bad3b2695848e0b25a232d
Diffstat (limited to 'extras/libmemif/src/libmemif.h')
-rw-r--r--extras/libmemif/src/libmemif.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/extras/libmemif/src/libmemif.h b/extras/libmemif/src/libmemif.h
index 609b98a7ba4..244c3fe2b72 100644
--- a/extras/libmemif/src/libmemif.h
+++ b/extras/libmemif/src/libmemif.h
@@ -145,9 +145,14 @@ typedef void (memif_free_t) (void *ptr);
/** \brief Memif control file descriptor update (callback function)
@param fd - new file descriptor to watch
@param events - event type(s) to watch for
+ @param private_ctx - libmemif main private context. Is NULL for
+ libmemif main created by memif_init()
+
This callback is called when there is new fd to watch for events on
or if fd is about to be closed (user mey want to stop watching for events on this fd).
+ Private context is taken from libmemif_main, 'private_ctx' passed to memif_per_thread_init()
+ or NULL in case of memif_init()
*/
typedef int (memif_control_fd_update_t) (int fd, uint8_t events,
void *private_ctx);