+ vec_validate (libc_ev, __maxevents);
+ timeout = clib_time_now (&vsm->clib_time) + time_to_wait;
+ do
+ {
+ rv = vppcom_epoll_wait (vep_idx, __events, __maxevents, 0);
+ rv2 = libc_epoll_pwait (__epfd, libc_ev, __maxevents, 1, __ss);
+ if ((rv > 0) || (rv2 > 0))
+ {
+ int n = __maxevents - rv;
+ n = rv2 <= n ? rv2 : n;
+ rv = (rv > 0) ? rv : 0;
+
+ clib_memcpy (&__events[rv], libc_ev, n * sizeof (*libc_ev));
+ rv += rv2;
+ goto out;
+ }
+ else if ((rv < 0) || (rv2 < 0))
+ {
+ if (rv < 0)
+ fprintf (stderr,
+ "[%d] ERROR: vppcom_epoll_wait() returned %d\n",
+ vsm->my_pid, rv);
+ if (rv2 < 0)
+ {
+ fprintf (stderr,
+ "[%d] ERROR: libc_epoll_wait() failed, errno %d\n",
+ vsm->my_pid, errno);
+ rv = (rv < 0) ? rv : -errno;
+ }
+ goto out;
+ }
+ }
+ while ((__timeout == -1)
+ || (clib_time_now (&vsm->clib_time) < timeout));