X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;f=common%2Fvnf_common%2Fthread.c;h=f6f1105f3781bf643495608cce1c73eb6cb763bd;hb=9dae4a62e3405311151e164d25e6d93d6a707726;hp=dcf272ff635601de4c95dac1b3ba6c362857f7f0;hpb=51cd08d9a3f2826088d122e2a5683315c77a2786;p=samplevnf.git diff --git a/common/vnf_common/thread.c b/common/vnf_common/thread.c index dcf272ff..f6f1105f 100644 --- a/common/vnf_common/thread.c +++ b/common/vnf_common/thread.c @@ -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];