From patchwork Tue Jul 3 22:14:50 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Ga=C3=ABtan_Rivet?= X-Patchwork-Id: 42176 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 5F66F1BE79; Wed, 4 Jul 2018 00:15:48 +0200 (CEST) Received: from mail-wr0-f175.google.com (mail-wr0-f175.google.com [209.85.128.175]) by dpdk.org (Postfix) with ESMTP id 570F81BE63 for ; Wed, 4 Jul 2018 00:15:43 +0200 (CEST) Received: by mail-wr0-f175.google.com with SMTP id r16-v6so251680wrt.11 for ; Tue, 03 Jul 2018 15:15:43 -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=iG6enogufd0bU+b5K1kPoxSy4SwvAFCFFEb2ql8MyHMsSC4E0Fl+8Vg2dxQVAJWm27 dD/ByxC0LoAwmwCakdGlI+GQQRPCF/vckg0jmnT5IEK70RvQBhfFan+3/4b83ykZ3rDx V0Li9KZ+IeHbUh8Y6ubq2r/kDFab+ILcSEB6IwydXqWXPTtBbTwVCFeMkqtgHAG13kY9 qpfMIkI4E1uXdr1CN8DE+ELABXEpZ8+sQ9s+hwszMA+2IROWamCtdNXAuDgWMGEgv1Hw i/6XX7mLwclaxQFK4rE4vImfJbCAez31SRWX2ApKrRK4fFcNVOQkVSAybzjt+/HNSurl a+JQ== 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=Sm466YWWMJ5JEMXgaRoJSGX4AzH69f61eSHIe01XDW3ha4eJ+WOuVtDe8OcBH9GpLr 1UGG7Kovjx4wwuiB4PeanjIjVido42lvMyVvu9briGzc4uJLqPQ9hDUWwTkECzjz8iur ww1MMQRSJKKkBam1AuW31t+146kU9U7LKW+83PggbhuWCI087UeL7tgXaZ4jdKTAfT9O nqh4rPYN12yAM/HOtCBStUqZ15rtWlbpwK1ySKZshjt6scd1Fkz8LZwKm1InqDxu6Dpi QyGMzwXNtnqPcIaMNHioHn69akWUKesSXDi9f8bEi+DtZ0rAQP3HHYH6p9XidiA5hLHd xqKA== X-Gm-Message-State: APt69E35CZXW+SirhKUYCt81rjSjntDd6T3yM7ShR/sJZqFEpz6c4cXz kuCbxfnNwnfS3H8LGqiAPC88yTUI X-Google-Smtp-Source: AAOMgpdeepLP0njrOwMm3BSWto0IC82x7KUeHLfZHDJrEgQ+OKeDfdGQ0cKbmjTjE8VAHSVYvDS8ZQ== X-Received: by 2002:adf:8345:: with SMTP id 63-v6mr24589348wrd.37.1530656142661; Tue, 03 Jul 2018 15:15:42 -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 i190-v6sm3771084wmd.33.2018.07.03.15.15.41 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 03 Jul 2018 15:15:41 -0700 (PDT) From: Gaetan Rivet To: dev@dpdk.org Cc: Gaetan Rivet Date: Wed, 4 Jul 2018 00:14:50 +0200 Message-Id: X-Mailer: git-send-email 2.11.0 In-Reply-To: References: In-Reply-To: References: Subject: [dpdk-dev] [PATCH v9 07/27] 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: , 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