From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr0-f195.google.com (mail-wr0-f195.google.com [209.85.128.195]) by dpdk.org (Postfix) with ESMTP id E68841BA9A for ; Wed, 11 Apr 2018 02:04:48 +0200 (CEST) Received: by mail-wr0-f195.google.com with SMTP id d19so44381wre.1 for ; Tue, 10 Apr 2018 17:04:48 -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=lK8dzS+i5IvsWE4sGvpUhuJFx6/0SZdcaaBLArcJXL88M5xeDGw1ESGlbj4paidNLk L8WiNXLJ7CP+ewiUALWoTg/7W17aO3JpAh0HG4O9wAmLScOEDBeKzYTlyJ9hDhfBET+W brb9+dFuM8ScKJhg7Nw1TXGdmLEVoaCAjQ2f5Cb0zNSRX5sHPWp9ATIk/jFRvJknTIPv lJC12eE0MjDBjakVMnFpmNGycgyarno7CemwDaY8MA6BcWp/akkmFOF5yf7Ef+mVMDIB lk5NSYfZcBR2ASQ7V/eglowIDKpJwdD10oHbdY7v6wf4stO/eo4gSw6SMo5OsFKHHHCU e6Cw== 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=CxNwv8rjbUyTI6nV25nFjzadHD457VTe7ZBBNzO4cfH9QFmYyZsMbtJT7AJIKRlumw Bg10oX+E6JCBiheKw6Lkn/SwcGlwZFIKi1cxvgSqMoKhUp7HPRTH+pb7p5Q76YPJsW/1 aD8OaEW6M2kYdC8zMBc4MbpjavPDEIO5dYUCtX1fHd8gthzFD4GQej5qGL5pdYi4LEpf 5cqqDMbb5h+5db/d9qMIFhdaIHutQDIQCnOpQK7rbKCnYQ6Lz/7yNkyL7uxouBYx6Qd/ 4v8Enpcg6Zjk7TLsUBFuy5qDUfg5Ps5nznLGMDdMKlcbdfG10stsGRYTSngDGyUYOHVC oW9w== X-Gm-Message-State: ALQs6tCIwKmx45LU1m+lTLikXn9DlqW97YdbGUZCpLdmYn3FyXaoHS5H XVvkbz1xhjlQMJwyYV6q0uX47VX0 X-Google-Smtp-Source: AIpwx48MCdJ7MeH/MwLIJxZD+oXIsgWRrZ95ZLIU+K+O245GT7PfT7Lke1mkxp9jdtov548eCFyOIw== X-Received: by 10.223.153.167 with SMTP id y36mr1705130wrb.136.1523405088362; Tue, 10 Apr 2018 17:04:48 -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 39sm7626563wry.89.2018.04.10.17.04.47 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 10 Apr 2018 17:04:47 -0700 (PDT) From: Gaetan Rivet To: dev@dpdk.org Cc: Gaetan Rivet Date: Wed, 11 Apr 2018 02:04:06 +0200 Message-Id: X-Mailer: git-send-email 2.11.0 In-Reply-To: References: In-Reply-To: References: Subject: [dpdk-dev] [PATCH v5 05/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: Wed, 11 Apr 2018 00:04:49 -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