From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f48.google.com (mail-wm0-f48.google.com [74.125.82.48]) by dpdk.org (Postfix) with ESMTP id 7B1851BE00 for ; Tue, 26 Jun 2018 18:56:55 +0200 (CEST) Received: by mail-wm0-f48.google.com with SMTP id l15-v6so15794231wmc.1 for ; Tue, 26 Jun 2018 09:56:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :in-reply-to:references; bh=28DRsv+QYAFHOkQRiCRQvubzBQLopqiLihNLEKJfEhQ=; b=R+paQGn6SqpX9XOmRNpktsGs/3hA9CkdBXQ9DiQU+1Ryc3BxgIRh1eONDf9yYeYwLj CPFwbeuLDnpi1JWIQ+Mwro/g8EkZ2e0pgqZfpTu8tKQiHF9UeThZA7v4t3yNdFYmPky+ fL4trfJDQ816oz0NuZwfJVT0P3P9tHG30qrqK+q352ErHb6Y5jcsefVt5AXSywskJgNw MaNtN6k6tpj2DGLS/M2Kj9Aqrlum/yDJMpx/AnNQYPqxyhVoavZsLSKyDlwuP8ju1ItP 5OYHxBpRQJKg82uvhUgGP/dR72TJLm/f5BlQJGnx9Itk5VmGVwxjPqUJ8XWH/iuOleJz +Z6w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:in-reply-to:references; bh=28DRsv+QYAFHOkQRiCRQvubzBQLopqiLihNLEKJfEhQ=; b=C6nc2VD60VkfLVAQaMbL/bYWq4/cFtRfxEnowZnNtJ0OC3CJ7EMUqmfa2tlczaqUnL j8dp5p7g/Sthy29ZT1UttSCe9FrFnkKBOHJEdQl1IfIHfv+c/0WzDQdNUCIySpik/o/E knJ7/ytvMVxBgU39FISYvs6+RTh5q0Vjtmrwb2B5poW4LcZGSRxTR8DyCHplyLawGM5e cOtLw1aVjThF8iv5ok0mkRuJuw2VUiqyiwhlcDbjlKL1+QfSFKQmpFnS5gHPlFyL4h8N OLs4AO8UHc0yEgqx+790R5AK2P8HyFAE4HbVk+71TUCSTMJLNN/yeK67P/6asRuiXKPR L/SQ== X-Gm-Message-State: APt69E2ORy51zEOT5VhNmEWuXanin8+OWB8pa3fUbz2+lwa94H8y4pgV WTvIa5BoKfK5JNmS5XdHO4RF2ld0 X-Google-Smtp-Source: AAOMgpfpsZyZXS1RovbcBvwYTAPfkynBdPneW7qNgmZIrf4y56U+qWq8myfF9v2qntASauiRFej8uA== X-Received: by 2002:a1c:17d4:: with SMTP id 203-v6mr2233554wmx.75.1530032214753; Tue, 26 Jun 2018 09:56:54 -0700 (PDT) Received: from bidouze.dev.6wind.com. (host.78.145.23.62.rev.coltfrance.com. [62.23.145.78]) by smtp.gmail.com with ESMTPSA id p5-v6sm2680880wre.83.2018.06.26.09.56.53 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 26 Jun 2018 09:56:53 -0700 (PDT) From: Gaetan Rivet To: dev@dpdk.org Cc: Gaetan Rivet Date: Tue, 26 Jun 2018 18:56:09 +0200 Message-Id: X-Mailer: git-send-email 2.11.0 In-Reply-To: References: In-Reply-To: References: Subject: [dpdk-dev] [PATCH v8 06/21] eal/class: register destructor X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Jun 2018 16:56:55 -0000 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