diff mbox series

[v8,06/21] eal/class: register destructor

Message ID ea4dc450d418ee5599be1eb239abd130d0525295.1530031921.git.gaetan.rivet@6wind.com (mailing list archive)
State Superseded, archived
Delegated to: Thomas Monjalon
Headers show
Series Device querying | expand

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation fail Compilation issues

Commit Message

Gaëtan Rivet June 26, 2018, 4:56 p.m. UTC
Signed-off-by: Gaetan Rivet <gaetan.rivet@6wind.com>
---
 lib/librte_eal/common/include/rte_class.h | 5 +++++
 1 file changed, 5 insertions(+)
diff mbox series

Patch

diff --git a/lib/librte_eal/common/include/rte_class.h b/lib/librte_eal/common/include/rte_class.h
index b5e550a34..e8176f5e1 100644
--- a/lib/librte_eal/common/include/rte_class.h
+++ b/lib/librte_eal/common/include/rte_class.h
@@ -112,6 +112,11 @@  static void classinitfn_ ##nm(void) \
 {\
 	(cls).name = RTE_STR(nm);\
 	rte_class_register(&cls); \
+} \
+RTE_FINI_PRIO(classfinifn_ ##nm, CLASS); \
+static void classfinifn_ ##nm(void) \
+{ \
+	rte_class_unregister(&cls); \
 }
 
 #ifdef __cplusplus