From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from wout1-smtp.messagingengine.com (wout1-smtp.messagingengine.com [64.147.123.24]) by dpdk.org (Postfix) with ESMTP id 341A27CEB for ; Tue, 10 Jul 2018 13:40:07 +0200 (CEST) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.west.internal (Postfix) with ESMTP id 9DE6B69F; Tue, 10 Jul 2018 07:40:05 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute1.internal (MEProxy); Tue, 10 Jul 2018 07:40:05 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-sender :x-me-sender:x-sasl-enc; s=mesmtp; bh=P9EUUL7j5YpJoArGu3OX1xeX2u nqFMVvUnj/wHi7Hlc=; b=a1HDlc/aFrIHwBMuvYzDllb62bOhQtvf8Z2gNx2/Te E8wYrSkiPObw7qtw7zq0O4GRwqZqp/vKC7Z2391E6UcXPlsEU0mpLXvGN5lyD4d7 QDbHIjQOLFqrs78txB3chqFAp2E4gMRuzCQqgzkDXKIt2QJ4UzTihK0QX1C29Pet 0= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; bh=P9EUUL 7j5YpJoArGu3OX1xeX2unqFMVvUnj/wHi7Hlc=; b=vYaWvfa4OEM9MbwdB6eMzE ZctSuiuBw6QxlYrIvlrJUTjpYOTaA4kMwVpuqokQatGEiduEF9uN8K9/H4OFwv6H G6jGjuf1ZY33faO9Np5Wti+VnhT28C+vCQ/0gHDC+9DAJLVKFuB4qQ3tSxdXcK/8 f7w+eKssATeVnm8k23F6uYx9q/kDwWYDOKAbHYxtzkFQrczobj6fw8jPMnCv+/r4 gpoSTaaVaL5ZfmLPLwzVE4YzbYOdEhPkz9ic2PiopdF3gGCVmsKbtqKrYboukzCy E2fO9G8v4rwPBe9CwPRsYkJDXL//VR1yZIowxLa6FI24n5L6va9mI/Kuw/0GgmXA == X-ME-Proxy: X-ME-Sender: Received: from xps.localnet (184.203.134.77.rev.sfr.net [77.134.203.184]) by mail.messagingengine.com (Postfix) with ESMTPA id 0BE1F1037B; Tue, 10 Jul 2018 07:40:03 -0400 (EDT) From: Thomas Monjalon To: Gaetan Rivet Cc: dev@dpdk.org, shreyansh.jain@nxp.com Date: Tue, 10 Jul 2018 13:40:01 +0200 Message-ID: <2903699.tLnOVabUjO@xps> In-Reply-To: <42037d90036505fc764572b8a4c8b25a529c4ec7.1530791217.git.gaetan.rivet@6wind.com> References: <42037d90036505fc764572b8a4c8b25a529c4ec7.1530791217.git.gaetan.rivet@6wind.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-dev] [PATCH v10 05/27] eal: introduce dtor macros 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, 10 Jul 2018 11:40:07 -0000 05/07/2018 13:48, Gaetan Rivet: > Signed-off-by: Gaetan Rivet Please justify why you need destructors, by providing a commit log. > --- a/lib/librte_eal/common/include/rte_common.h > +++ b/lib/librte_eal/common/include/rte_common.h > @@ -111,6 +111,29 @@ static void __attribute__((constructor(RTE_PRIO(prio)), used)) func(void) > #define RTE_INIT(func) \ > RTE_INIT_PRIO(func, LAST) > > +/** > + * Run after main() with low priority. > + * > + * @param func > + * Destructor function name. > + * @param prio > + * Priority number must be above 100. > + * Lowest number is the last to run. > + */ > +#define RTE_FINI_PRIO(func, prio) \ > +static void __attribute__((destructor(RTE_PRIO(prio)), used)) func(void) I don't like the name of this macro. What about RTE_CLEAN_PRIO?