Can use exit_flag to do controlled shutdown of the control thread.

Signed-off-by: Stephen Hemminger <[email protected]>
---
 drivers/dma/skeleton/skeleton_dmadev.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/drivers/dma/skeleton/skeleton_dmadev.c 
b/drivers/dma/skeleton/skeleton_dmadev.c
index e287802eb9..62a25f9d34 100644
--- a/drivers/dma/skeleton/skeleton_dmadev.c
+++ b/drivers/dma/skeleton/skeleton_dmadev.c
@@ -5,8 +5,6 @@
 #include <inttypes.h>
 #include <stdlib.h>
 
-#include <pthread.h>
-
 #include <bus_vdev_driver.h>
 #include <rte_cycles.h>
 #include <rte_eal.h>
@@ -215,10 +213,9 @@ skeldma_stop(struct rte_dma_dev *dev)
 {
        struct skeldma_hw *hw = dev->data->dev_private;
 
+       /* setting exit flag causes cpuwork_thread to exit polling loop */
        hw->exit_flag = true;
-       rte_delay_ms(1);
 
-       (void)pthread_cancel((pthread_t)hw->thread.opaque_id);
        rte_thread_join(hw->thread, NULL);
 
        return 0;
-- 
2.47.3

Reply via email to