From b5c1e5ada70953b98de4edb9c780549771559a39 Mon Sep 17 00:00:00 2001 From: Jim Harris Date: Tue, 20 Sep 2016 16:04:51 -0700 Subject: [PATCH] event: allocate/free IO channel thread context in reactor This will help catch any cases where I/O channels are not released during shutdown. Signed-off-by: Jim Harris Change-Id: I96cf93218026b9ef319abcf0662fe258bf75174d --- lib/event/reactor.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/event/reactor.c b/lib/event/reactor.c index 47f8111e1..88735b493 100644 --- a/lib/event/reactor.c +++ b/lib/event/reactor.c @@ -56,6 +56,7 @@ #include "reactor.h" #include "spdk/log.h" +#include "spdk/io_channel.h" #define SPDK_MAX_SOCKET 64 @@ -305,6 +306,7 @@ _spdk_reactor_run(void *arg) uint64_t spin_cycles, sleep_cycles; uint32_t sleep_us; + spdk_allocate_thread(); set_reactor_thread_name(); SPDK_NOTICELOG("Reactor started on core 0x%x\n", rte_lcore_id()); @@ -369,6 +371,7 @@ _spdk_reactor_run(void *arg) } } + spdk_free_thread(); return 0; }