From mboxrd@z Thu Jan 1 00:00:00 1970 From: Gaetan Rivet Subject: [PATCH v6 06/22] eal/class: register destructor Date: Fri, 13 Apr 2018 15:22:21 +0200 Message-ID: <0120619359846c9c2a527567e765d2f803d5fa2a.1523625525.git.gaetan.rivet@6wind.com> References: Cc: Gaetan Rivet To: dev@dpdk.org Return-path: Received: from mail-wr0-f196.google.com (mail-wr0-f196.google.com [209.85.128.196]) by dpdk.org (Postfix) with ESMTP id 11D451BB4D for ; Fri, 13 Apr 2018 15:23:05 +0200 (CEST) Received: by mail-wr0-f196.google.com with SMTP id d1so8267091wrj.13 for ; Fri, 13 Apr 2018 06:23:05 -0700 (PDT) In-Reply-To: In-Reply-To: References: List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Signed-off-by: Gaetan Rivet --- lib/librte_eal/common/include/rte_class.h | 5 +++++ 1 file changed, 5 insertions(+) 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 -- 2.11.0