crypto/openssl: support DES-CBC
[dpdk.git] / lib / librte_vhost / fd_man.c
index c7a4490..4c6fed4 100644 (file)
@@ -210,8 +210,8 @@ fdset_del(struct fdset *pfdset, int fd)
  * will wait until the flag is reset to zero(which indicates the callback is
  * finished), then it could free the context after fdset_del.
  */
-void
-fdset_event_dispatch(struct fdset *pfdset)
+void *
+fdset_event_dispatch(void *arg)
 {
        int i;
        struct pollfd *pfd;
@@ -221,9 +221,11 @@ fdset_event_dispatch(struct fdset *pfdset)
        int fd, numfds;
        int remove1, remove2;
        int need_shrink;
+       struct fdset *pfdset = arg;
+       int val;
 
        if (pfdset == NULL)
-               return;
+               return NULL;
 
        while (1) {
 
@@ -238,7 +240,9 @@ fdset_event_dispatch(struct fdset *pfdset)
                numfds = pfdset->num;
                pthread_mutex_unlock(&pfdset->fd_mutex);
 
-               poll(pfdset->rwfds, numfds, 1000 /* millisecs */);
+               val = poll(pfdset->rwfds, numfds, 1000 /* millisecs */);
+               if (val < 0)
+                       continue;
 
                need_shrink = 0;
                for (i = 0; i < numfds; i++) {
@@ -294,4 +298,6 @@ fdset_event_dispatch(struct fdset *pfdset)
                if (need_shrink)
                        fdset_shrink(pfdset);
        }
+
+       return NULL;
 }