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 11D451BB4D for ; Fri, 13 Apr 2018 15:23:05 +0200 (CEST) Received: by mail-wr0-f196.google.com with SMTP id d1so8267091wrj.13 for ; Fri, 13 Apr 2018 06:23:05 -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=L606CRCFm6LGRaciaiDDEzSHXXbvUUNF9pch6Qd85TnOikdsdKSBn+/cfyp2X6Bv63 5mo5erKnyAMaVdMsb+bhCUWVpI/lan1XYI+hhTTCBtymISumVNvs2LtweLovOJVE2pJN 9ysBrq6aH4Wqqw/XFmFDIRMLAxlMYTaqGHhmOYvqMFDWmf4JlknYBs2atj9VbNuWmWF+ ga5ubqhLGtXG/8pjaWRIUH80t+ap3o2t77pUiW4Ea0+NF/5i3BH5l3fJe6rYvJLIHiMI mPV1627XhrVBSnARaqA3+wYSNQCJWujLe44VijyZXwJr3pVbl/vBcnvB8C7G0xRc9nU9 MT4A== 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=RRdNMawRyljxGFmKLzEDQqfmpx6jOOSw9mEa4lhb2bKEFJCw7fVmPx1R2vfpETZxWz gia//X4RkZgZW54OlcDDeW9D5rAMHrNOn4sO9U04nnjHnYgTJO/Dhy1XmzVqX2XJPkXY 3X+GtNE0727R5NaumsEzwAkkAnG2AsvMTjl5vTn5w5WzIqFnggk0YSUqgSSJrB/Zn9fP rEG2OGHWVncyy2lDjxeRz20IVnx1ZZywaTFj7XBeheVQydR7SCj9TXQMpoua3op2KMH6 BrrLv7PHNKvGZq3dKb71g+vKLmVGl4vUBnqckSCbKYyPGmH+Sb0MhHV1tqy5XNyiUo9S FJ9Q== X-Gm-Message-State: ALQs6tC0fDOuGxFH0cJZUIqPDt5v4CE/MNBZJYjlDCvAe8a6n+c83YRr i3eAmZ5pyy6avDz4OObKIVVK19nh X-Google-Smtp-Source: AIpwx4+VLkb3BnZt2jzH9+rlmjBGTd2q9fRpK1VkclntRKvLs2aEDkOKVPe4sgV8dWHwv0lzVQICNg== X-Received: by 10.223.144.195 with SMTP id i61mr4040025wri.227.1523625784447; Fri, 13 Apr 2018 06:23:04 -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 r200sm2377244wmb.9.2018.04.13.06.23.03 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 13 Apr 2018 06:23:03 -0700 (PDT) From: Gaetan Rivet To: dev@dpdk.org Cc: Gaetan Rivet Date: Fri, 13 Apr 2018 15:22:21 +0200 Message-Id: <0120619359846c9c2a527567e765d2f803d5fa2a.1523625525.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 v6 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: Fri, 13 Apr 2018 13:23:05 -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