From 63b34c8d2208d17fe7741df71ac178f47b17923d Mon Sep 17 00:00:00 2001 From: Florin Coras Date: Fri, 10 May 2024 20:28:12 -0700 Subject: vcl: fix poll support Type: fix Change-Id: I827f19d893153277baba3c2d0efde5f2827eb0ff Signed-off-by: Florin Coras --- src/vcl/vcl_locked.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'src/vcl/vcl_locked.c') diff --git a/src/vcl/vcl_locked.c b/src/vcl/vcl_locked.c index 9f3d6b56c2e..bae1c0d86b3 100644 --- a/src/vcl/vcl_locked.c +++ b/src/vcl/vcl_locked.c @@ -1626,6 +1626,20 @@ vls_select (int n_bits, vcl_si_set * read_map, vcl_si_set * write_map, return rv; } +int +vls_poll (vcl_poll_t *vp, uint32_t n_sids, double wait_for_time) +{ + int rv; + vcl_locked_session_t *vls = NULL; + + vls_mt_detect (); + vls_mt_guard (vls, VLS_MT_OP_XPOLL); + rv = vppcom_poll (vp, n_sids, wait_for_time); + vls_mt_unguard (); + vls_handle_pending_wrk_cleanup (); + return rv; +} + static void vls_unshare_vcl_worker_sessions (vcl_worker_t * wrk) { -- cgit 1.2.3-korg