summaryrefslogtreecommitdiffstats
path: root/src/vlib/threads.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/vlib/threads.h')
-rw-r--r--src/vlib/threads.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/vlib/threads.h b/src/vlib/threads.h
index 8931584b5a9..aaba218ffd3 100644
--- a/src/vlib/threads.h
+++ b/src/vlib/threads.h
@@ -362,6 +362,13 @@ static void __vlib_add_thread_registration_##x (void) \
x.next = tm->next; \
tm->next = &x; \
} \
+static void __vlib_rm_thread_registration_##x (void) \
+ __attribute__((__destructor__)) ; \
+static void __vlib_rm_thread_registration_##x (void) \
+{ \
+ vlib_thread_main_t * tm = &vlib_thread_main; \
+ VLIB_REMOVE_FROM_LINKED_LIST (tm->next, &x, next); \
+} \
__VA_ARGS__ vlib_thread_registration_t x
always_inline u32