[v5,07/10] eal_interrupts: don't reinitialize threads
Checks
Commit Message
From: Sinan Kaya <okaya@kernel.org>
Initialize interrupt thread once and keep a flag
for further init.
Signed-off-by: Sinan Kaya <okaya@kernel.org>
---
lib/eal/linux/eal_interrupts.c | 6 ++++++
1 file changed, 6 insertions(+)
@@ -1174,6 +1174,10 @@ int
rte_eal_intr_init(void)
{
int ret = 0;
+ static bool run_once;
+
+ if (run_once)
+ return 0;
/* init the global interrupt source head */
TAILQ_INIT(&intr_sources);
@@ -1196,6 +1200,8 @@ rte_eal_intr_init(void)
"Failed to create thread for interrupt handling\n");
}
+ run_once = true;
+
return ret;
}