From mboxrd@z Thu Jan 1 00:00:00 1970 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) 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=PCRnRPomPgF0Kx4c7E17amjJP5f+Beo5mCelENxMlfOXz/5hcxXJ5umgodsoZfzeRg zNOhGWn34NRWhbL/ZZyImXd0l7XME+l6dD8ALf9egY6sNyBKGoy5NOYiFVERHXScoSno mXmJS0+jcmVnvtpQ8cHVhwb/eZGtPHXNLraNG5INFLep/+0wKLr8hoark7qnLU4gCZtJ 1EUo3St+upAZtdSTIJxTJFGY5uhiV3Heq5stowwZ/jF1dGburV9GN+vBGsDYMbjE3x0p x+6ZwOzvpdPu4Om4btTKfBNa8sz2lWEn10Bo8l1L5f1ZrPHzad9jLhFOQVQjQvVPUcvq Y/8g== 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=Y4jLHlHpcP50ey9A3BXfZg+D7/1YVIxTWz4zNf1tFQrvaVt9IRgxc1RINZqCs2tSrx Z7BJRqN85fGtv2MuuzogvV/DnyAr8U0LHf/xA8WykueNuu4UaobUGd8YjqZQu1agdmOd /B3uJbjOeL3hivCSSlSZjwvHVc1BuXklxSkIlgB5Y41x6yrKACGjogI4wdBTQ2di8Z8N vfoDE8NLN4SqZLgypooT3gbq71IcNJ+izNwgoYO5iH19Da195gPh/akmCiSTylfXZJtT Kf6CVsiKDdFRUFkkakyZ6QVVnay39v78tvkq0KmSf40L95ezZiBfdDYGXPfvNGBtEP0o SHuA== X-Gm-Message-State: ALQs6tCG4kYhcHIIzSAB0OA8eD8bFaFZ4hesLPLGiHD4u2QVXiiEAwAP Lyla+7lZI0QHSfvFc0iEs9N9jPba X-Google-Smtp-Source: AIpwx4+KJtEHB0n4RH/or4jp9RW57jz/2+6IiwRPJjeSC4RlhSfao25UW51DxH/r4VSQR/so62tWBg== X-Received: by 10.223.169.215 with SMTP id b81mr7847731wrd.48.1523804897588; Sun, 15 Apr 2018 08:08:17 -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 r200sm13673438wmb.39.2018.04.15.08.08.16 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 15 Apr 2018 08:08:16 -0700 (PDT) From: Gaetan Rivet To: dev@dpdk.org Cc: Gaetan Rivet Date: Sun, 15 Apr 2018 17:07:35 +0200 Message-Id: <0120619359846c9c2a527567e765d2f803d5fa2a.1523804657.git.gaetan.rivet@6wind.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: References: In-Reply-To: References: Subject: [dpdk-dev] [PATCH v7 06/22] 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: Sun, 15 Apr 2018 15:08:18 -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