Fix compilation issue with older gcc
[samplevnf.git] / common / vnf_common / thread.c
index dcf272f..f6f1105 100644 (file)
@@ -59,6 +59,8 @@ do {                                                  \
 
 #endif
 
+uint32_t exit_app_thread = 0;
+
 static inline void *
 thread_msg_recv(struct rte_ring *r)
 {
@@ -226,6 +228,9 @@ app_thread(void *arg)
                uint32_t n_regular = RTE_MIN(t->n_regular, RTE_DIM(t->regular));
                uint32_t n_custom = RTE_MIN(t->n_custom, RTE_DIM(t->custom));
 
+               if (exit_app_thread)
+                       break;
+
                /* Run regular pipelines */
                for (j = 0; j < n_regular; j++) {
                        struct app_thread_pipeline_data *data = &t->regular[j];