From mboxrd@z Thu Jan 1 00:00:00 1970 From: Shreyansh Jain Subject: Re: [PATCH v3 06/20] eal/class: register destructor Date: Tue, 27 Mar 2018 14:12:51 +0530 Message-ID: <21a2a39b-a8a7-195b-49b8-b24d8026c9b2@nxp.com> References: <63ecbe92f158267aaf817c3183644d0fe39f6e9b.1522105876.git.gaetan.rivet@6wind.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Cc: dev@dpdk.org To: Gaetan Rivet Return-path: Received: from EUR01-HE1-obe.outbound.protection.outlook.com (mail-he1eur01on0082.outbound.protection.outlook.com [104.47.0.82]) by dpdk.org (Postfix) with ESMTP id 288C34C7C for ; Tue, 27 Mar 2018 10:43:14 +0200 (CEST) In-Reply-To: <63ecbe92f158267aaf817c3183644d0fe39f6e9b.1522105876.git.gaetan.rivet@6wind.com> Content-Language: en-US List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On 3/27/2018 4:48 AM, Gaetan Rivet wrote: > 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 59b578e3e..95107d937 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 > I think this can be merged with the Patch 05/20 - isn't it?