diff options
author | Enrico Loparco (eloparco) <eloparco@cisco.com> | 2021-04-05 12:10:45 +0200 |
---|---|---|
committer | Enrico Loparco (eloparco) <eloparco@cisco.com> | 2021-06-24 09:20:11 +0200 |
commit | 1c37763975af0a6c89a9089aa606155227e67d41 (patch) | |
tree | 4722a4abeda4cdf188a512a6508d0d79d1fda330 /hicn-light/src/hicn/base/loop.h | |
parent | 229385955109b866a23c4ac2aa03d4d11044c39d (diff) |
[HICN-555, HICN-556] Add loop utility function and fix memory bug in bitmap
A helper function is added to the loop class to allow loop exit after empty event queue. This function is used when running tests.
Signed-off-by: Enrico Loparco (eloparco) <eloparco@cisco.com>
Change-Id: I7bbab32a7d7f53365439f0fba2b9a030d34ac823
Diffstat (limited to 'hicn-light/src/hicn/base/loop.h')
-rw-r--r-- | hicn-light/src/hicn/base/loop.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/hicn-light/src/hicn/base/loop.h b/hicn-light/src/hicn/base/loop.h index 697021175..544d73cd7 100644 --- a/hicn-light/src/hicn/base/loop.h +++ b/hicn-light/src/hicn/base/loop.h @@ -52,7 +52,15 @@ loop_t *loop_create(); void loop_free(loop_t *loop); /** - * \brief Runs the loop instance to process events + * \brief Runs the loop instance to process events (helper). + * \param [in] loop - Pointer to the loop instance + * \param [in] flags - Loop mode: EVLOOP_ONCE, EVLOOP_NONBLOCK or EVLOOP_NO_EXIT_ON_EMPTY + * \return 0 if successful, -1 otherwise + */ +int _loop_dispatch(loop_t *loop, int flags); + +/** + * \brief Runs the loop instance to process events. * \param [in] loop - Pointer to the loop instance * \return 0 if successful, -1 otherwise */ |