From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f54.google.com (mail-wm0-f54.google.com [74.125.82.54]) by dpdk.org (Postfix) with ESMTP id 91D011BED7 for ; Thu, 5 Jul 2018 13:49:06 +0200 (CEST) Received: by mail-wm0-f54.google.com with SMTP id n17-v6so10381492wmh.2 for ; Thu, 05 Jul 2018 04:49:06 -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; bh=FcfHZwJj2++2zFd3tjiryPVfINYFEtqKre4w5Koeb+8=; b=BMWriSxcPtsU59MqYjUeNK1vCq+mrhon6FPuG0ZUrVUktAm/ePJv32F8Aq3MLFw3SF 0odwRpi6i4Kue8A1TYGtSrGZtWK+6GUgwAQ1tWuo+CcRvxahPUbg7I6oJ98UxFaeloS9 uuiGDbmcAHXnnOMhmUVRtP1wlLFIcfis2mQMTgIR6PY5Y+Sbb6xioOoH8LOeDyX0NkXg 9LmofAgKjxpGwCyj7NdHy/gOTAN+E5g4c4nWlkklZZYCT6Uj/enRLF6tcmJgMcFUmQ2F /fOQLgNGgJZa2FmVXqvMis43cXRYsL4tvuiGqvjPkmsuXCPSC4MBNuBHXMCXeg731ZBK ofTQ== 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; bh=FcfHZwJj2++2zFd3tjiryPVfINYFEtqKre4w5Koeb+8=; b=ZwkWT/WdtcQKZk77msd2/0qZXG12t6OpTnBnagec2+sdjS9DkKHq4frK2hrC2+3WUg V4GMuwzx0GTc0GJhpZZ5x8fm0blMQCeAV/UimJQfy4gvfZopUAwnGSR7a/KGzQ+orK92 3bg/LZwK0M/V7dqnISwEUVaFhR5k7u2fgajzLPCXG8c5Q4FOI8V7dImEZudSQ/naV/wo 7hzTMEP/uaeMZqZbjN4f74NQpiR9j9ith7YV+TmVYPy3WUBSwHWu4tin5DKg60JrcA9W jBJjr6cTwx3I3nBNgWU1uW+nBxnGvg4+YlUmDfX+gEA2MPkCF9PsT6jyB4fIThqfyIJq T2ig== X-Gm-Message-State: APt69E1U5hb6l3N+qRaFH+OklX3sD1BgGVyrpusp9Or26UamoGGPVd3M 7omoTyW6WEals5uK0zYjW8WT4wun X-Google-Smtp-Source: AAOMgpeqHG27zYmBMz/+tKupCXt10wM6C8pLvxCjm1kYZe1xPOz37UTgFQm7MWAJuyrbT5p04siZrg== X-Received: by 2002:a1c:82c8:: with SMTP id e191-v6mr3635736wmd.35.1530791345953; Thu, 05 Jul 2018 04:49:05 -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 o42-v6sm15809183wrc.50.2018.07.05.04.49.04 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 05 Jul 2018 04:49:04 -0700 (PDT) From: Gaetan Rivet To: dev@dpdk.org Cc: Gaetan Rivet Date: Thu, 5 Jul 2018 13:48:14 +0200 Message-Id: X-Mailer: git-send-email 2.18.0 In-Reply-To: References: Subject: [dpdk-dev] [PATCH v10 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: , X-List-Received-Date: Thu, 05 Jul 2018 11:49:07 -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.18.0