From mboxrd@z Thu Jan 1 00:00:00 1970 From: Gaetan Rivet Subject: [PATCH v7 06/22] eal/class: register destructor Date: Sun, 15 Apr 2018 17:07:35 +0200 Message-ID: <0120619359846c9c2a527567e765d2f803d5fa2a.1523804657.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 373DC1B417 for ; Sun, 15 Apr 2018 17:08:18 +0200 (CEST) Received: by mail-wr0-f196.google.com with SMTP id d1so19284834wrj.13 for ; Sun, 15 Apr 2018 08:08:18 -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